From e8f311429ea9afa09195bed21f078bbd50dd791e Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Sat, 5 Sep 2026 19:42:15 -0700 Subject: [PATCH] fix(cost-map): stop advertising reasoning_effort max on azure_ai/gpt-6-astra Foundry rejects reasoning_effort max on the gpt-6-astra deployment with a 400 that names none, low, medium, high, and xhigh as the supported values, so the card no longer lists max. The request path never gated max (only xhigh is opt-in), so this only changes /model_group/info and router capability gating. The azure/ twin stays as is because it was not verified on an Azure OpenAI host --- .../model_prices_and_context_window_backup.json | 2 +- model_prices_and_context_window.json | 2 +- .../test_reasoning_effort_capability.py | 14 +++++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 5b4652d38c7..b659c3b65e5 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -3518,7 +3518,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/model_prices_and_context_window.json b/model_prices_and_context_window.json index 5b4652d38c7..b659c3b65e5 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -3518,7 +3518,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.py index 3e1f26b6e1c..fa3a6dcd95a 100644 --- a/tests/test_litellm/router_utils/test_reasoning_effort_capability.py +++ b/tests/test_litellm/router_utils/test_reasoning_effort_capability.py @@ -394,7 +394,6 @@ 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): @@ -413,3 +412,16 @@ class TestGpt6AstraAdvertisesItsDocumentedLevels: "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", + "medium", + "high", + "xhigh", + )