From 0d579d5af4d11c381982c33c956c9305fcd0485d Mon Sep 17 00:00:00 2001 From: michelligabriele Date: Fri, 22 May 2026 00:18:40 +0200 Subject: [PATCH] fix(model_catalog): set supports_service_tier on azure/gpt-5.1 and azure/gpt-5.2 --- ...odel_prices_and_context_window_backup.json | 2 ++ model_prices_and_context_window.json | 2 ++ .../test_azure_priority_pricing_metadata.py | 21 +++++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/litellm/model_prices_and_context_window_backup.json b/litellm/model_prices_and_context_window_backup.json index 0845ac3623b..af7f4bba195 100644 --- a/litellm/model_prices_and_context_window_backup.json +++ b/litellm/model_prices_and_context_window_backup.json @@ -4548,6 +4548,7 @@ "supports_response_schema": true, "supports_system_messages": true, "supports_tool_choice": true, + "supports_service_tier": true, "supports_vision": true, "supports_none_reasoning_effort": true }, @@ -4709,6 +4710,7 @@ "supports_response_schema": true, "supports_system_messages": true, "supports_tool_choice": true, + "supports_service_tier": true, "supports_vision": true }, "azure/gpt-5.2-2025-12-11": { diff --git a/model_prices_and_context_window.json b/model_prices_and_context_window.json index 976d8350ad6..c7c8ddfba40 100644 --- a/model_prices_and_context_window.json +++ b/model_prices_and_context_window.json @@ -4548,6 +4548,7 @@ "supports_response_schema": true, "supports_system_messages": true, "supports_tool_choice": true, + "supports_service_tier": true, "supports_vision": true, "supports_none_reasoning_effort": true }, @@ -4709,6 +4710,7 @@ "supports_response_schema": true, "supports_system_messages": true, "supports_tool_choice": true, + "supports_service_tier": true, "supports_vision": true }, "azure/gpt-5.2-2025-12-11": { diff --git a/tests/test_litellm/test_azure_priority_pricing_metadata.py b/tests/test_litellm/test_azure_priority_pricing_metadata.py index a455908d38c..8080038ed6c 100644 --- a/tests/test_litellm/test_azure_priority_pricing_metadata.py +++ b/tests/test_litellm/test_azure_priority_pricing_metadata.py @@ -33,6 +33,27 @@ def test_azure_priority_pricing_keys_present( assert info["cache_read_input_token_cost_priority"] == cache_read_priority +# Aliases that should carry supports_service_tier to match their dated counterparts +# (azure/gpt-5.1-2025-11-13, azure/gpt-5.2-2025-12-11). PR #24924 covers the gpt-4.1 aliases. +AZURE_SUPPORTS_SERVICE_TIER_ALIASES = [ + "azure/gpt-5.1", + "azure/gpt-5.2", +] + + +@pytest.mark.parametrize("model", AZURE_SUPPORTS_SERVICE_TIER_ALIASES) +def test_azure_undated_aliases_advertise_service_tier_support(model): + json_path = Path(__file__).parents[2] / "model_prices_and_context_window.json" + with open(json_path) as f: + model_cost = json.load(f) + + info = model_cost.get(model) + assert info is not None, f"{model} not found in model catalog" + assert ( + info.get("supports_service_tier") is True + ), f"{model} should advertise supports_service_tier=true to match its dated variant" + + def test_azure_priority_pricing_backup_matches_main(): """Ensure the bundled model cost map stays in sync with the canonical file.""" repo_root = Path(__file__).parents[2]