diff --git a/litellm/llms/azure/chat/gpt_transformation.py b/litellm/llms/azure/chat/gpt_transformation.py index 880a51eb584..53d080427ea 100644 --- a/litellm/llms/azure/chat/gpt_transformation.py +++ b/litellm/llms/azure/chat/gpt_transformation.py @@ -130,6 +130,7 @@ class AzureOpenAIConfig(BaseConfig): "web_search_options", "prompt_cache_key", "store", + "service_tier", ] @classmethod diff --git a/tests/test_litellm/llms/azure/chat/test_azure_chat_gpt_transformation.py b/tests/test_litellm/llms/azure/chat/test_azure_chat_gpt_transformation.py index 4e6b9ed0188..8c8d758e4e6 100644 --- a/tests/test_litellm/llms/azure/chat/test_azure_chat_gpt_transformation.py +++ b/tests/test_litellm/llms/azure/chat/test_azure_chat_gpt_transformation.py @@ -52,6 +52,28 @@ class TestAzureOpenAIConfig: supported_params = config.get_supported_openai_params("gpt-4.1") assert "prompt_cache_key" in supported_params + def test_service_tier_supported(self): + """Test that 'service_tier' is in supported params for Azure OpenAI models and preserved with drop_params=True.""" + config: Final = AzureOpenAIConfig() + supported_params: Final = config.get_supported_openai_params("gpt-4.1") + assert "service_tier" in supported_params + + mapped: Final = config.map_openai_params( + non_default_params={"service_tier": "priority"}, + optional_params={}, + model="azure/gpt-4.1", + drop_params=True, + ) + assert mapped.get("service_tier") == "priority" + + opt: Final = get_optional_params( + model="azure/gpt-4o", + custom_llm_provider="azure", + service_tier="priority", + drop_params=True, + ) + assert opt.get("service_tier") == "priority" + def test_map_openai_params_with_preview_api_version(): config = AzureOpenAIConfig()