Updating Gemini flash pointers in registry and frontend to preview-09-2025 (#3584)

This commit is contained in:
pedrohsdb
2025-10-01 15:41:14 -07:00
committed by GitHub
parent fae8e8f089
commit bb48db6288
2 changed files with 45 additions and 6 deletions

View File

@@ -364,11 +364,11 @@ class Settings(BaseSettings):
if self.is_cloud_environment():
return {
"gemini-2.5-pro-preview-05-06": {"llm_key": "VERTEX_GEMINI_2.5_PRO", "label": "Gemini 2.5 Pro"},
"gemini-2.5-flash-preview-05-20": {
"gemini-2.5-flash-preview-09-2025": {
"llm_key": "VERTEX_GEMINI_2.5_FLASH",
"label": "Gemini 2.5 Flash",
},
"gemini-2.5-flash-lite": {
"gemini-2.5-flash-lite-preview-09-2025": {
"llm_key": "VERTEX_GEMINI_2.5_FLASH_LITE",
"label": "Gemini 2.5 Flash Lite",
},
@@ -396,11 +396,11 @@ class Settings(BaseSettings):
# TODO: apparently the list for OSS is to be much larger
return {
"gemini-2.5-pro-preview-05-06": {"llm_key": "VERTEX_GEMINI_2.5_PRO", "label": "Gemini 2.5 Pro"},
"gemini-2.5-flash-preview-05-20": {
"gemini-2.5-flash-preview-09-2025": {
"llm_key": "VERTEX_GEMINI_2.5_FLASH",
"label": "Gemini 2.5 Flash",
},
"gemini-2.5-flash-lite": {
"gemini-2.5-flash-lite-preview-09-2025": {
"llm_key": "VERTEX_GEMINI_2.5_FLASH_LITE",
"label": "Gemini 2.5 Flash Lite",
},

View File

@@ -1079,7 +1079,7 @@ if settings.ENABLE_VERTEX_AI and settings.VERTEX_CREDENTIALS:
),
)
LLMConfigRegistry.register_config(
"VERTEX_GEMINI_2.5_FLASH",
"VERTEX_GEMINI_2.5_FLASH_DEPRECATED",
LLMConfig(
"vertex_ai/gemini-2.5-flash",
["VERTEX_CREDENTIALS"],
@@ -1098,7 +1098,7 @@ if settings.ENABLE_VERTEX_AI and settings.VERTEX_CREDENTIALS:
),
)
LLMConfigRegistry.register_config(
"VERTEX_GEMINI_2.5_FLASH_LITE",
"VERTEX_GEMINI_2.5_FLASH_LITE_DEPRECATED",
LLMConfig(
"vertex_ai/gemini-2.5-flash-lite",
["VERTEX_CREDENTIALS"],
@@ -1173,6 +1173,45 @@ if settings.ENABLE_VERTEX_AI and settings.VERTEX_CREDENTIALS:
),
),
)
LLMConfigRegistry.register_config(
"VERTEX_GEMINI_2.5_FLASH",
LLMConfig(
"vertex_ai/gemini-2.5-flash-preview-09-2025",
["VERTEX_CREDENTIALS"],
supports_vision=True,
add_assistant_prefix=False,
max_completion_tokens=65535,
litellm_params=LiteLLMParams(
vertex_credentials=settings.VERTEX_CREDENTIALS,
api_base=f"{api_base}/gemini-2.5-flash-preview-09-2025" if api_base else None,
vertex_location=settings.VERTEX_LOCATION,
thinking={
"budget_tokens": settings.GEMINI_THINKING_BUDGET,
"type": "enabled" if settings.GEMINI_INCLUDE_THOUGHT else None,
},
),
),
)
LLMConfigRegistry.register_config(
"VERTEX_GEMINI_2.5_FLASH_LITE",
LLMConfig(
"vertex_ai/gemini-2.5-flash-lite-preview-09-2025",
["VERTEX_CREDENTIALS"],
supports_vision=True,
add_assistant_prefix=False,
max_completion_tokens=65535,
litellm_params=LiteLLMParams(
vertex_credentials=settings.VERTEX_CREDENTIALS,
api_base=f"{api_base}/gemini-2.5-flash-lite-preview-09-2025" if api_base else None,
vertex_location=settings.VERTEX_LOCATION,
thinking={
"budget_tokens": settings.GEMINI_THINKING_BUDGET,
"type": "enabled" if settings.GEMINI_INCLUDE_THOUGHT else None,
},
),
),
)
# Register old keys as aliases to prevent breaking existing tasks
LLMConfigRegistry.register_config(
"VERTEX_GEMINI_2.5_FLASH_PREVIEW_09_2025",
LLMConfig(