fix(azure): add service_tier to AzureOpenAIConfig supported params (#39719)

This commit is contained in:
amasen02 2026-09-04 16:46:49 +05:30
parent c8635ecc67
commit a2b260a9b1
2 changed files with 23 additions and 0 deletions

View file

@ -130,6 +130,7 @@ class AzureOpenAIConfig(BaseConfig):
"web_search_options",
"prompt_cache_key",
"store",
"service_tier",
]
@classmethod

View file

@ -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()