mirror of
https://github.com/k8sgpt-ai/k8sgpt.git
synced 2026-07-17 18:30:21 +00:00
The two Vertex AI "Legacy Stable Model" constants carried a trailing '*' that leaked in from the footnote marker in Google's model-versions table: ModelGeminiProV1_5 was "gemini-1.5-pro-002*" and ModelGeminiFlashV1_5 was "gemini-1.5-flash-002*". The '*' is not part of the model id. GetVertexAIModelOrDefault does an exact-match lookup and otherwise silently returns VERTEXAI_MODELS[0]. Because VERTEXAI_MODELS held the asterisked values, a user who correctly configured --model gemini-1.5-pro-002 failed the exact match and was silently switched to the default model, so the two legacy models could never be selected. Remove the trailing '*' from both literals and add a unit test covering the model and region resolvers. Closes #1516 Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>