litellm/tests/pass_through_unit_tests
Ishaan Jaff 2a3843aa57
[Fix] inconsistent response format in anthropic.messages.acreate() when using non anthropic providers (#20442)
* _translate_openai_content_to_anthropic

* test_response_format_consistency

* test fixes unit tests

* test fix

* fix: use dict access for anthropic content blocks in tests (#20447)

The translate_openai_response_to_anthropic method returns dicts, not objects.
Changed .type/.text/.thinking attribute access to dict ['key'] access.

---------

Co-authored-by: shin-bot-litellm <shin-bot-litellm@berri.ai>
2026-02-04 16:37:40 -08:00
..
messages_api_structured_output
base_anthropic_messages_prompt_caching_test.py
base_anthropic_messages_tool_search_test.py
base_anthropic_unified_messages_test.py [Fix] inconsistent response format in anthropic.messages.acreate() when using non anthropic providers (#20442) 2026-02-04 16:37:40 -08:00
test_anthropic_messages_passthrough.py [Fix] inconsistent response format in anthropic.messages.acreate() when using non anthropic providers (#20442) 2026-02-04 16:37:40 -08:00
test_anthropic_messages_prompt_caching.py
test_anthropic_messages_tool_search.py
test_assemblyai_unit_tests_passthrough.py
test_bedrock_anthropic_messages_test.py
test_bedrock_tool_use_beta_header.py
test_claude_code_marketplace.py
test_custom_logger_passthrough.py
test_pass_through_unit_tests.py
test_passthrough_registry_updates.py
test_unit_test_anthropic_pass_through.py
test_unit_test_passthrough_router.py
test_unit_test_streaming.py
test_vertex_ai_anthropic_streaming_cost_injection.py
test_vertex_ai_live_passthrough.py
test_websearch_interception_e2e.py