diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index bcac953da08..57a2c4b27df 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -9431,6 +9431,7 @@ "us": 1.1, "fast": 6.0 }, + "supports_max_reasoning_effort": true, "supports_minimal_reasoning_effort": true }, "claude-opus-4-7-20260416": { @@ -9465,6 +9466,7 @@ "us": 1.1, "fast": 6.0 }, + "supports_max_reasoning_effort": true, "supports_minimal_reasoning_effort": true }, "claude-sonnet-4-20250514": { @@ -16280,7 +16282,8 @@ "/v1/audio/speech" ], "tpm": 4000000, - "rpm": 10 + "rpm": 10, + "supports_thinking_budget_zero": true }, "gemini/gemini-2.5-pro": { "cache_read_input_token_cost": 1.25e-07, @@ -38785,7 +38788,8 @@ "audio" ], "supports_audio_input": true, - "supports_audio_output": true + "supports_audio_output": true, + "supports_thinking_budget_zero": true }, "gemini-2.5-flash-native-audio-preview-09-2025": { "input_cost_per_audio_token": 1e-06, @@ -38809,7 +38813,8 @@ "audio" ], "supports_audio_input": true, - "supports_audio_output": true + "supports_audio_output": true, + "supports_thinking_budget_zero": true }, "gemini-2.5-flash-native-audio-preview-12-2025": { "input_cost_per_audio_token": 1e-06, @@ -38833,7 +38838,8 @@ "audio" ], "supports_audio_input": true, - "supports_audio_output": true + "supports_audio_output": true, + "supports_thinking_budget_zero": true }, "gemini-3.1-flash-live-preview": { "input_cost_per_audio_token": 3e-06, @@ -38891,7 +38897,8 @@ "supports_audio_input": true, "supports_audio_output": true, "tpm": 250000, - "rpm": 10 + "rpm": 10, + "supports_thinking_budget_zero": true }, "gemini/gemini-2.5-flash-native-audio-preview-09-2025": { "input_cost_per_audio_token": 1e-06, @@ -38917,7 +38924,8 @@ "supports_audio_input": true, "supports_audio_output": true, "tpm": 250000, - "rpm": 10 + "rpm": 10, + "supports_thinking_budget_zero": true }, "gemini/gemini-2.5-flash-native-audio-preview-12-2025": { "input_cost_per_audio_token": 1e-06, @@ -38943,7 +38951,8 @@ "supports_audio_input": true, "supports_audio_output": true, "tpm": 250000, - "rpm": 10 + "rpm": 10, + "supports_thinking_budget_zero": true }, "gemini/gemini-3.1-flash-live-preview": { "input_cost_per_audio_token": 3e-06, @@ -38987,7 +38996,8 @@ "source": "https://ai.google.dev/pricing", "supported_endpoints": [ "/v1/audio/speech" - ] + ], + "supports_thinking_budget_zero": true }, "gemini-flash-latest": { "cache_read_input_token_cost": 3e-08, diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 1826caddcf0..8ec490d0b03 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -8046,16 +8046,17 @@ }, "bedrock/us-east-1/minimax.minimax-m2.5": { "input_cost_per_token": 3e-07, - "output_cost_per_token": 1.2e-06, "litellm_provider": "bedrock", "max_input_tokens": 1000000, "max_output_tokens": 8192, "max_tokens": 8192, "mode": "chat", + "source": "https://aws.amazon.com/bedrock/pricing/", "supports_function_calling": true, + "supports_reasoning": true, "supports_system_messages": true, "supports_tool_choice": true, - "source": "https://aws.amazon.com/bedrock/pricing/" + "output_cost_per_token": 1.2e-06 }, "bedrock/us-east-1/moonshotai.kimi-k2-thinking": { "input_cost_per_token": 6e-07, @@ -8663,16 +8664,17 @@ }, "bedrock/us-west-2/minimax.minimax-m2.5": { "input_cost_per_token": 3e-07, - "output_cost_per_token": 1.2e-06, "litellm_provider": "bedrock", "max_input_tokens": 1000000, "max_output_tokens": 8192, "max_tokens": 8192, "mode": "chat", + "source": "https://aws.amazon.com/bedrock/pricing/", "supports_function_calling": true, + "supports_reasoning": true, "supports_system_messages": true, "supports_tool_choice": true, - "source": "https://aws.amazon.com/bedrock/pricing/" + "output_cost_per_token": 1.2e-06 }, "bedrock/us-west-2/moonshotai.kimi-k2-thinking": { "input_cost_per_token": 6e-07, @@ -9443,6 +9445,7 @@ "us": 1.1, "fast": 6.0 }, + "supports_max_reasoning_effort": true, "supports_minimal_reasoning_effort": true }, "claude-opus-4-7-20260416": { @@ -9477,6 +9480,7 @@ "us": 1.1, "fast": 6.0 }, + "supports_max_reasoning_effort": true, "supports_minimal_reasoning_effort": true }, "claude-sonnet-4-20250514": { @@ -16292,7 +16296,8 @@ "/v1/audio/speech" ], "tpm": 4000000, - "rpm": 10 + "rpm": 10, + "supports_thinking_budget_zero": true }, "gemini/gemini-2.5-pro": { "cache_read_input_token_cost": 1.25e-07, @@ -22706,13 +22711,14 @@ }, "minimax.minimax-m2.5": { "input_cost_per_token": 3e-07, - "output_cost_per_token": 1.2e-06, "litellm_provider": "bedrock_converse", "max_input_tokens": 1000000, "max_output_tokens": 8192, "max_tokens": 8192, "mode": "chat", + "output_cost_per_token": 1.2e-06, "supports_function_calling": true, + "supports_reasoning": true, "supports_system_messages": true, "supports_tool_choice": true, "source": "https://aws.amazon.com/bedrock/pricing/" @@ -34773,17 +34779,17 @@ }, "zai.glm-5": { "input_cost_per_token": 1e-06, - "output_cost_per_token": 3.2e-06, "litellm_provider": "bedrock_converse", "max_input_tokens": 200000, "max_output_tokens": 128000, "max_tokens": 128000, "mode": "chat", + "output_cost_per_token": 3.2e-06, + "source": "https://aws.amazon.com/bedrock/pricing/", "supports_function_calling": true, "supports_reasoning": true, "supports_system_messages": true, - "supports_tool_choice": true, - "source": "https://aws.amazon.com/bedrock/pricing/" + "supports_tool_choice": true }, "zai/glm-5": { "cache_creation_input_token_cost": 0, @@ -38863,7 +38869,8 @@ "audio" ], "supports_audio_input": true, - "supports_audio_output": true + "supports_audio_output": true, + "supports_thinking_budget_zero": true }, "gemini-2.5-flash-native-audio-preview-09-2025": { "input_cost_per_audio_token": 1e-06, @@ -38887,7 +38894,8 @@ "audio" ], "supports_audio_input": true, - "supports_audio_output": true + "supports_audio_output": true, + "supports_thinking_budget_zero": true }, "gemini-2.5-flash-native-audio-preview-12-2025": { "input_cost_per_audio_token": 1e-06, @@ -38911,7 +38919,8 @@ "audio" ], "supports_audio_input": true, - "supports_audio_output": true + "supports_audio_output": true, + "supports_thinking_budget_zero": true }, "gemini-3.1-flash-live-preview": { "input_cost_per_audio_token": 3e-06, @@ -38969,7 +38978,8 @@ "supports_audio_input": true, "supports_audio_output": true, "tpm": 250000, - "rpm": 10 + "rpm": 10, + "supports_thinking_budget_zero": true }, "gemini/gemini-2.5-flash-native-audio-preview-09-2025": { "input_cost_per_audio_token": 1e-06, @@ -38995,7 +39005,8 @@ "supports_audio_input": true, "supports_audio_output": true, "tpm": 250000, - "rpm": 10 + "rpm": 10, + "supports_thinking_budget_zero": true }, "gemini/gemini-2.5-flash-native-audio-preview-12-2025": { "input_cost_per_audio_token": 1e-06, @@ -39021,7 +39032,8 @@ "supports_audio_input": true, "supports_audio_output": true, "tpm": 250000, - "rpm": 10 + "rpm": 10, + "supports_thinking_budget_zero": true }, "gemini/gemini-3.1-flash-live-preview": { "input_cost_per_audio_token": 3e-06, @@ -39065,7 +39077,8 @@ "source": "https://ai.google.dev/pricing", "supported_endpoints": [ "/v1/audio/speech" - ] + ], + "supports_thinking_budget_zero": true }, "gemini-flash-latest": { "cache_read_input_token_cost": 3e-08, @@ -39566,6 +39579,20 @@ } ] }, + "zai.glm-5": { + "input_cost_per_token": 1e-06, + "output_cost_per_token": 3.2e-06, + "litellm_provider": "bedrock_converse", + "max_input_tokens": 200000, + "max_output_tokens": 128000, + "max_tokens": 128000, + "mode": "chat", + "supports_function_calling": true, + "supports_reasoning": true, + "supports_system_messages": true, + "supports_tool_choice": true, + "source": "https://aws.amazon.com/bedrock/pricing/" + }, "bedrock/us-east-1/zai.glm-5": { "input_cost_per_token": 1e-06, "output_cost_per_token": 3.2e-06, @@ -39594,6 +39621,45 @@ "supports_tool_choice": true, "source": "https://aws.amazon.com/bedrock/pricing/" }, + "minimax.minimax-m2.5": { + "input_cost_per_token": 3e-07, + "output_cost_per_token": 1.2e-06, + "litellm_provider": "bedrock_converse", + "max_input_tokens": 1000000, + "max_output_tokens": 8192, + "max_tokens": 8192, + "mode": "chat", + "supports_function_calling": true, + "supports_system_messages": true, + "supports_tool_choice": true, + "source": "https://aws.amazon.com/bedrock/pricing/" + }, + "bedrock/us-east-1/minimax.minimax-m2.5": { + "input_cost_per_token": 3e-07, + "output_cost_per_token": 1.2e-06, + "litellm_provider": "bedrock", + "max_input_tokens": 1000000, + "max_output_tokens": 8192, + "max_tokens": 8192, + "mode": "chat", + "supports_function_calling": true, + "supports_system_messages": true, + "supports_tool_choice": true, + "source": "https://aws.amazon.com/bedrock/pricing/" + }, + "bedrock/us-west-2/minimax.minimax-m2.5": { + "input_cost_per_token": 3e-07, + "output_cost_per_token": 1.2e-06, + "litellm_provider": "bedrock", + "max_input_tokens": 1000000, + "max_output_tokens": 8192, + "max_tokens": 8192, + "mode": "chat", + "supports_function_calling": true, + "supports_system_messages": true, + "supports_tool_choice": true, + "source": "https://aws.amazon.com/bedrock/pricing/" + }, "bedrock/us-gov-east-1/anthropic.claude-haiku-4-5-20251001-v1:0": { "cache_creation_input_token_cost": 1.5e-06, "cache_read_input_token_cost": 1.2e-07, diff --git a/tests/llm_translation/test_gemini.py b/tests/llm_translation/test_gemini.py index d4c791ffbfb..6a617f4a50c 100644 --- a/tests/llm_translation/test_gemini.py +++ b/tests/llm_translation/test_gemini.py @@ -1642,9 +1642,9 @@ async def test_gemini_flash_to_pro_fallback_thinking_budget_zero(): thinking_param={"type": "enabled", "budget_tokens": 0}, model="gemini-2.5-pro", ) - assert "thinkingBudget" not in pro_config, ( - "thinkingBudget=0 must not be sent to Pro — it causes a 400 INVALID_ARGUMENT" - ) + assert ( + "thinkingBudget" not in pro_config + ), "thinkingBudget=0 must not be sent to Pro — it causes a 400 INVALID_ARGUMENT" # Flash must still receive thinkingBudget=0 (it supports disabling thinking) flash_config = VertexGeminiConfig._map_thinking_param( @@ -1708,7 +1708,9 @@ async def test_gemini_flash_to_pro_fallback_thinking_budget_zero(): thinking={"type": "enabled", "budget_tokens": 0}, ) - assert call_count == 2, f"Expected 2 calls (flash then pro fallback), got {call_count}" + assert ( + call_count == 2 + ), f"Expected 2 calls (flash then pro fallback), got {call_count}" assert response.choices[0].message.content == "Hello!" # The thinking param reaches pro but thinkingBudget=0 is not in the translated body assert pro_call_kwargs.get("thinking") == {"type": "enabled", "budget_tokens": 0} diff --git a/tests/test_litellm/llms/gemini/test_gemini_thinking_param.py b/tests/test_litellm/llms/gemini/test_gemini_thinking_param.py index 72497b4891a..2f63f4166b4 100644 --- a/tests/test_litellm/llms/gemini/test_gemini_thinking_param.py +++ b/tests/test_litellm/llms/gemini/test_gemini_thinking_param.py @@ -57,13 +57,34 @@ class TestMapThinkingParamBudgetZero: assert result.get("includeThoughts") is True def test_model_supports_thinking_budget_zero_flash(self, local_model_cost_map): - assert VertexGeminiConfig._model_supports_thinking_budget_zero("gemini-2.5-flash") is True - assert VertexGeminiConfig._model_supports_thinking_budget_zero("gemini/gemini-2.5-flash") is True - assert VertexGeminiConfig._model_supports_thinking_budget_zero("gemini-2.5-flash-lite") is True + assert ( + VertexGeminiConfig._model_supports_thinking_budget_zero("gemini-2.5-flash") + is True + ) + assert ( + VertexGeminiConfig._model_supports_thinking_budget_zero( + "gemini/gemini-2.5-flash" + ) + is True + ) + assert ( + VertexGeminiConfig._model_supports_thinking_budget_zero( + "gemini-2.5-flash-lite" + ) + is True + ) def test_model_supports_thinking_budget_zero_pro(self): - assert VertexGeminiConfig._model_supports_thinking_budget_zero("gemini-2.5-pro") is False - assert VertexGeminiConfig._model_supports_thinking_budget_zero("gemini/gemini-2.5-pro") is False + assert ( + VertexGeminiConfig._model_supports_thinking_budget_zero("gemini-2.5-pro") + is False + ) + assert ( + VertexGeminiConfig._model_supports_thinking_budget_zero( + "gemini/gemini-2.5-pro" + ) + is False + ) def test_model_supports_thinking_budget_zero_none(self): assert VertexGeminiConfig._model_supports_thinking_budget_zero(None) is False diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py index 09393496644..33db1015340 100644 --- a/tests/test_litellm/test_utils.py +++ b/tests/test_litellm/test_utils.py @@ -2826,9 +2826,9 @@ def test_gemini_embedding_2_ga_in_cost_map(): assert info.get("input_cost_per_audio_per_second") == 0.00016 assert info.get("input_cost_per_video_per_second") == 0.00079 if provider in ("vertex_ai-embedding-models", "vertex_ai"): - assert info.get("uses_embed_content") is True, ( - f"{key} must have uses_embed_content=true for correct Vertex AI routing" - ) + assert ( + info.get("uses_embed_content") is True + ), f"{key} must have uses_embed_content=true for correct Vertex AI routing" def test_gemini_lyria_3_preview_models_in_cost_map():