mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix(azure_ai): return native Responses config for management ops (model=None)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
34d32c04e5
commit
538a86885d
2 changed files with 9 additions and 1 deletions
|
|
@ -8226,7 +8226,7 @@ class ProviderConfigManager:
|
|||
azure_ai_supports_native_responses,
|
||||
)
|
||||
|
||||
if azure_ai_supports_native_responses(model):
|
||||
if model is None or azure_ai_supports_native_responses(model):
|
||||
return litellm.AzureAIResponsesAPIConfig()
|
||||
return None
|
||||
elif litellm.LlmProviders.XAI == provider:
|
||||
|
|
|
|||
|
|
@ -65,6 +65,14 @@ def test_azure_ai_resolves_native_responses_config(model):
|
|||
assert isinstance(config, AzureAIResponsesAPIConfig)
|
||||
|
||||
|
||||
def test_azure_ai_resolves_native_config_for_management_ops():
|
||||
"""Management ops (delete/get/cancel/list) call the lookup with model=None; it must
|
||||
still return the native config so those operations can build the right URL after a
|
||||
native create succeeds."""
|
||||
config = ProviderConfigManager.get_provider_responses_api_config(provider="azure_ai", model=None)
|
||||
assert isinstance(config, AzureAIResponsesAPIConfig)
|
||||
|
||||
|
||||
@pytest.mark.parametrize("model", ["claude-3-5-sonnet", "model_router/gpt-5", "agents/my-agent"])
|
||||
def test_azure_ai_non_responses_models_keep_bridge(model):
|
||||
"""Claude / model-router / agents routes have their own surfaces, so they must
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue