fix(test): update Azure pass-through test after Responses API routing change#22334
fix(test): update Azure pass-through test after Responses API routing change#22334
Conversation
Commit 99c62ca removed "azure" from _RESPONSES_API_PROVIDERS, routing Azure models through litellm.completion instead of litellm.responses. The test was not updated to match, causing it to assert against the wrong mock. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryFixes a broken test caused by commit
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_anthropic_experimental_pass_through_messages_handler.py | Updated test to patch litellm.completion instead of litellm.responses for Azure models, correctly reflecting the routing change in _RESPONSES_API_PROVIDERS. Minor stale docstring in an adjacent test. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[anthropic_messages_handler] --> B{_should_route_to_responses_api?}
B -->|"provider == 'openai'"| C[LiteLLMMessagesToResponsesAPIHandler]
C --> D["litellm.responses()"]
B -->|"provider == 'azure' or other"| E[LiteLLMMessagesToCompletionTransformationHandler]
E --> F["litellm.completion()"]
style B fill:#f9f,stroke:#333,stroke-width:2px
style F fill:#bbf,stroke:#333,stroke-width:2px,color:#000
style D fill:#bfb,stroke:#333,stroke-width:2px,color:#000
Last reviewed commit: 273994b
Additional Comments (1)
The docstring on line 20 still says "OpenAI and Azure models are routed directly to the Responses API", but since commit |
|
@shin-bot-litellm evaluate this PR |
Summary
99c62ca40eremoved"azure"from_RESPONSES_API_PROVIDERS, routing Azure models throughlitellm.completioninstead oflitellm.responsestest_anthropic_experimental_pass_through_messages_handler_dynamic_api_key_and_api_base_and_custom_valueswas still patchinglitellm.responses, causing it to fail since the mock was never calledlitellm.completionto match the current routing behaviorTest plan
main🤖 Generated with Claude Code