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): azure/gpt-6-astra accepts reasoning_effort none on Foundry
mateo-berri51514b9123a6
diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.jsonindex d8b7287eba7..2459ed940e0 100644--- a/litellm/model_prices_and_context_window_backup.json+++ b/litellm/model_prices_and_context_window_backup.json@@ -7192,7 +7192,7 @@"supports_max_reasoning_effort": true,"supports_minimal_reasoning_effort": false,"supports_native_streaming": true,- "supports_none_reasoning_effort": false,+ "supports_none_reasoning_effort": true,"supports_parallel_function_calling": true,"supports_pdf_input": true,"supports_prompt_caching": true,@@ -7458,7 +7458,7 @@"supports_max_reasoning_effort": true,"supports_minimal_reasoning_effort": false,"supports_native_streaming": true,- "supports_none_reasoning_effort": false,+ "supports_none_reasoning_effort": true,"supports_parallel_function_calling": true,"supports_pdf_input": true,"supports_prompt_caching": true,diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.jsonindex d8b7287eba7..2459ed940e0 100644--- a/model_prices_and_context_window.json+++ b/model_prices_and_context_window.json@@ -7192,7 +7192,7 @@"supports_max_reasoning_effort": true,"supports_minimal_reasoning_effort": false,"supports_native_streaming": true,- "supports_none_reasoning_effort": false,+ "supports_none_reasoning_effort": true,"supports_parallel_function_calling": true,"supports_pdf_input": true,"supports_prompt_caching": true,@@ -7458,7 +7458,7 @@"supports_max_reasoning_effort": true,"supports_minimal_reasoning_effort": false,"supports_native_streaming": true,- "supports_none_reasoning_effort": false,+ "supports_none_reasoning_effort": true,"supports_parallel_function_calling": true,"supports_pdf_input": true,"supports_prompt_caching": true,diff --git a/tests/test_litellm/llms/azure/chat/test_azure_gpt5_transformation.py b/tests/test_litellm/llms/azure/chat/test_azure_gpt5_transformation.pyindex bd0f16a695b..3b3ef1a9cd4 100644--- a/tests/test_litellm/llms/azure/chat/test_azure_gpt5_transformation.py+++ b/tests/test_litellm/llms/azure/chat/test_azure_gpt5_transformation.py@@ -348,3 +348,31 @@ def test_azure_gpt_6_astra_takes_the_reasoning_series_request_shape():assert params["max_completion_tokens"] == 100assert "max_tokens" not in paramsassert params["reasoning_effort"] == "max"++[email protected]("model", ["azure/gpt-6-astra", "azure/us/gpt-6-astra"])+def test_azure_gpt6_astra_reasoning_effort_none_unlocks_temperature(config: AzureOpenAIGPT5Config, model: str):+ """Foundry's gpt-6-astra accepts reasoning_effort='none' and, only then, a non-default+ temperature (verified live against a Foundry deployment), unlike OpenAI's gpt-6-astra."""+ params = config.map_openai_params(+ non_default_params={"temperature": 0.2, "reasoning_effort": "none"},+ optional_params={},+ model=model,+ drop_params=False,+ api_version="2025-04-01-preview",+ )+ assert params["temperature"] == 0.2+ assert params["reasoning_effort"] == "none"++[email protected]("model", ["azure/gpt-6-astra", "azure/us/gpt-6-astra"])+def test_azure_gpt6_astra_rejects_reasoning_effort_minimal(config: AzureOpenAIGPT5Config, model: str):+ """Foundry's gpt-6-astra lists none, low, medium, high, xhigh and max but not minimal."""+ with pytest.raises(litellm.utils.UnsupportedParamsError):+ config.map_openai_params(+ non_default_params={"reasoning_effort": "minimal"},+ optional_params={},+ model=model,+ drop_params=False,+ api_version="2025-04-01-preview",+ )diff --git a/tests/test_litellm/router_utils/test_reasoning_effort_capability.py b/tests/test_litellm/router_utils/test_reasoning_effort_capability.pyindex 504e87fb231..f181370455d 100644--- a/tests/test_litellm/router_utils/test_reasoning_effort_capability.py+++ b/tests/test_litellm/router_utils/test_reasoning_effort_capability.py@@ -390,14 +390,16 @@ class TestGpt6AstraAdvertisesItsDocumentedLevels:)@pytest.mark.parametrize("model", ["azure/gpt-6-astra", "azure/us/gpt-6-astra"])- def test_a_foundry_deployment_advertises_the_same_levels(self, local_model_cost_map, model):- """Microsoft Foundry serves the same model, so an Azure deployment must offer low- through max and never none, exactly like the OpenAI entry."""+ def test_a_foundry_deployment_also_advertises_none(self, local_model_cost_map, model):+ """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."""from litellm.utils import _get_model_info_helpermodel_info = dict(_get_model_info_helper(model=model, custom_llm_provider="azure"))assert resolve_supported_reasoning_efforts(model_info, deployment_is_mapped=True) == (+ "none","low","medium","high",