From c9dd4b44f8d696d3d703f31b77f6257990db3ecf Mon Sep 17 00:00:00 2001 From: kerry Date: Tue, 15 Sep 2026 23:51:56 +0000 Subject: [PATCH] revert(model_info): keep Gemini baseline majors single-digit Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/model_prices_and_context_window_backup.json | 2 +- model_prices_and_context_window.json | 2 +- .../litellm_core_utils/test_fallback_generalizations.py | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 5537f13f5fd..36b4a2c308a 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -58152,7 +58152,7 @@ }, { "name": "gemini-chat-baseline", - "pattern": "gemini-(?!.*(?:-tts|-image|-live|-audio|-embedding|-computer-use|-robotics|-transcribe|-translate))(?:2[.-][5-9]|(?:[3-9]|[1-9]\\d)(?:[.-]\\d{1,2})?)-(?:pro|flash)(?:-lite)?(?![a-z])", + "pattern": "gemini-(?!.*(?:-tts|-image|-live|-audio|-embedding|-computer-use|-robotics|-transcribe|-translate))(?:2[.-][5-9]|[3-9](?:[.-]\\d{1,2})?)-(?:pro|flash)(?:-lite)?(?![a-z])", "description": "Any Gemini text-chat id at 2.5 or higher under any namespace, including bare ids, gemini/, vertex_ai/, openrouter/google/, deepinfra/google/, vercel_ai_gateway/google/, oci/google., and databricks-gemini--: gemini-[.minor]-(pro|flash)[-lite] with any trailing preview, date or variant tag. The capability flags were verified against each of those providers' own catalogs and docs. The lookahead excludes the tts, image, live, audio, embedding, computer-use, robotics, transcribe and translate lines, which are different modes with different capabilities. Provider-specific deviations, such as Perplexity's Agent API serving these as mode responses, are carried by their exact map entries, which always win over this rule. Carries no token limits or pricing, so those stay on the standard unmapped behavior rather than a guessed number. Source check 2026-09-15: all 45 first-party 2.5+ text-chat entries in this map carry every field below, and the OpenRouter (openrouter.ai/api/v1/models), Vercel AI Gateway (ai-gateway.vercel.sh/v1/models), DeepInfra (api.deepinfra.com/models/list), OCI and Databricks model docs list reasoning, tools and image input for the same models.", "model_info": { "mode": "chat", diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 5537f13f5fd..36b4a2c308a 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -58152,7 +58152,7 @@ }, { "name": "gemini-chat-baseline", - "pattern": "gemini-(?!.*(?:-tts|-image|-live|-audio|-embedding|-computer-use|-robotics|-transcribe|-translate))(?:2[.-][5-9]|(?:[3-9]|[1-9]\\d)(?:[.-]\\d{1,2})?)-(?:pro|flash)(?:-lite)?(?![a-z])", + "pattern": "gemini-(?!.*(?:-tts|-image|-live|-audio|-embedding|-computer-use|-robotics|-transcribe|-translate))(?:2[.-][5-9]|[3-9](?:[.-]\\d{1,2})?)-(?:pro|flash)(?:-lite)?(?![a-z])", "description": "Any Gemini text-chat id at 2.5 or higher under any namespace, including bare ids, gemini/, vertex_ai/, openrouter/google/, deepinfra/google/, vercel_ai_gateway/google/, oci/google., and databricks-gemini--: gemini-[.minor]-(pro|flash)[-lite] with any trailing preview, date or variant tag. The capability flags were verified against each of those providers' own catalogs and docs. The lookahead excludes the tts, image, live, audio, embedding, computer-use, robotics, transcribe and translate lines, which are different modes with different capabilities. Provider-specific deviations, such as Perplexity's Agent API serving these as mode responses, are carried by their exact map entries, which always win over this rule. Carries no token limits or pricing, so those stay on the standard unmapped behavior rather than a guessed number. Source check 2026-09-15: all 45 first-party 2.5+ text-chat entries in this map carry every field below, and the OpenRouter (openrouter.ai/api/v1/models), Vercel AI Gateway (ai-gateway.vercel.sh/v1/models), DeepInfra (api.deepinfra.com/models/list), OCI and Databricks model docs list reasoning, tools and image input for the same models.", "model_info": { "mode": "chat", diff --git a/tests/test_litellm/litellm_core_utils/test_fallback_generalizations.py b/tests/test_litellm/litellm_core_utils/test_fallback_generalizations.py index 4e7d7e85a8c..71e6e20b1a4 100644 --- a/tests/test_litellm/litellm_core_utils/test_fallback_generalizations.py +++ b/tests/test_litellm/litellm_core_utils/test_fallback_generalizations.py @@ -458,12 +458,10 @@ def shipped_cost_map(monkeypatch): ("vertex_ai/gemini-4-pro", None), ("gemini-4-pro-preview-customtools", "gemini"), ("google/gemini-4-pro", "openrouter"), - ("google/gemini-12.5-flash-lite", "openrouter"), ("google/gemini-4-pro", "deepinfra"), ("google/gemini-4-pro", "vercel_ai_gateway"), ("google.gemini-4-pro", "oci"), ("databricks-gemini-4-1-pro", "databricks"), - ("gemini-10-pro", "gemini"), ], ) def test_shipped_gemini_chat_baseline_resolves_unmapped_ids(shipped_cost_map, model, provider):