The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(cost-map): stop advertising reasoning_effort max on the azure gpt-6-astra rows
mateo-berrie79f3ec5205d
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex b659c3b65e5..48c51f8bbf5 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -7237,7 +7237,7 @@],"supports_computer_use": true,"supports_function_calling": true,- "supports_max_reasoning_effort": true,+ "supports_max_reasoning_effort": false,"supports_minimal_reasoning_effort": false,"supports_native_streaming": true,"supports_none_reasoning_effort": true,@@ -7503,7 +7503,7 @@],"supports_computer_use": true,"supports_function_calling": true,- "supports_max_reasoning_effort": true,+ "supports_max_reasoning_effort": false,"supports_minimal_reasoning_effort": false,"supports_native_streaming": true,"supports_none_reasoning_effort": true,diff --git a/litellm/router_utils/reasoning_effort_capability.py b/litellm/router_utils/reasoning_effort_capability.pyindex 9185d901a28..7b145c15a07 100644--- a/litellm/router_utils/reasoning_effort_capability.py+++ b/litellm/router_utils/reasoning_effort_capability.py@@ -10,8 +10,8 @@ opt-in. none is opt-out everywhere except the azure gpt-5 family, whose config rUnsupportedParamsError without an explicit true.xhigh is gated on the request path by the openai and azure gpt-5 configs. max is not gated there at-all: every entry carrying supports_max_reasoning_effort is Claude-family, and-anthropic/chat/transformation.py gates max on the output_config path while its reasoning_effort+all: outside the gpt-6-astra rows every entry carrying supports_max_reasoning_effort is Claude-family,+and anthropic/chat/transformation.py gates max on the output_config path while its reasoning_effortpath maps any level to a thinking budget. Making max opt-in is a deliberate trade, then, since anexplicit flag is the only signal that the tier is a real one rather than litellm rounding the levelto a budget, and a missing flag costs advisory metadata rather than a rejected request.diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex b659c3b65e5..48c51f8bbf5 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -7237,7 +7237,7 @@],"supports_computer_use": true,"supports_function_calling": true,- "supports_max_reasoning_effort": true,+ "supports_max_reasoning_effort": false,"supports_minimal_reasoning_effort": false,"supports_native_streaming": true,"supports_none_reasoning_effort": true,@@ -7503,7 +7503,7 @@],"supports_computer_use": true,"supports_function_calling": true,- "supports_max_reasoning_effort": true,+ "supports_max_reasoning_effort": false,"supports_minimal_reasoning_effort": false,"supports_native_streaming": true,"supports_none_reasoning_effort": true,diff --git a/tests/test_litellm/router_utils/test_reasoning_effort_capability.py b/tests/test_litellm/router_utils/test_reasoning_effort_capability.pyindex fa3a6dcd95a..ccd6766b13a 100644--- a/tests/test_litellm/router_utils/test_reasoning_effort_capability.py+++ b/tests/test_litellm/router_utils/test_reasoning_effort_capability.py@@ -394,30 +394,20 @@ class TestGpt6AstraAdvertisesItsDocumentedLevels:[("azure/gpt-6-astra", "azure"),("azure/us/gpt-6-astra", "azure"),+ ("azure_ai/gpt-6-astra", "azure_ai"),],)- def test_a_foundry_deployment_also_advertises_none(self, local_model_cost_map, model, custom_llm_provider):- """Microsoft Foundry serves the same model but its API accepts reasoning_effort none- (verified live: 200 with zero reasoning tokens, and it unlocks temperature), which- OpenAI's rejects, so an Azure deployment offers none on top of low through max."""+ def test_an_azure_hosted_deployment_advertises_none_but_not_max(+ self, local_model_cost_map, model, custom_llm_provider+ ):+ """Microsoft hosts the same model with a different level set than OpenAI does. Verified live+ on both Azure routes: none returns 200 with zero reasoning tokens and unlocks temperature,+ which OpenAI's API rejects, while max returns 400 unsupported_value naming none through+ xhigh as the levels it does take."""from litellm.utils import _get_model_info_helpermodel_info = dict(_get_model_info_helper(model=model, custom_llm_provider=custom_llm_provider))- assert resolve_supported_reasoning_efforts(model_info, deployment_is_mapped=True) == (- "none",- "low",- "medium",- "high",- "xhigh",- "max",- )-- def test_a_foundry_azure_ai_deployment_advertises_none_but_not_max(self, local_model_cost_map):- from litellm.utils import _get_model_info_helper-- model_info = dict(_get_model_info_helper(model="azure_ai/gpt-6-astra", custom_llm_provider="azure_ai"))-assert resolve_supported_reasoning_efforts(model_info, deployment_is_mapped=True) == ("none","low",