litellm/tests/unit/llms/anthropic
kenneth-berri 018104fa40
fix(responses): forward reasoning.effort for a Router deployment of a model the cost map does not list (#56048)
* fix(responses): forward reasoning.effort for a Router deployment the cost map has never listed

The Router registers every deployment under its shared backend key, and for a model the cost map does not list that row is empty. The reasoning gate read the empty row as a known model without supports_reasoning and refused reasoning.effort, so the fail-open path for unknown models was unreachable through the Router and the proxy. A row that names no provider is now treated as unknown.

Fixes #55919

* fix(responses): tell a Router-registered row from a catalog row by the catalog, not the provider field

A second deployment of the same backend model writes the resolved provider back onto the shared row, so the provider field could not tell the two apart.

* test(messages): expect effort none on the Responses bridge for a Router deployment of an unlisted model

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* docs(responses): say when a resolved model with no reasoning flag is still treated as unknown

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-12-03 12:13:09 -08:00
..
batches feat(anthropic): workload identity federation and pluggable identity sources (#44448) 2026-10-03 17:08:30 -07:00
chat fix(cost_map): accept reasoning_effort xhigh on Claude 5+ models newer than the cost map (#55880) 2026-12-03 02:32:41 +00:00
files chore(typing): clear 670 basedpyright Any errors by validating provider payloads at the boundary (#45388) 2026-10-13 15:35:23 -07:00
messages fix(responses): forward reasoning.effort for a Router deployment of a model the cost map does not list (#56048) 2026-12-03 12:13:09 -08:00
pass_through refactor(anthropic): rename llms/anthropic/pass_through to llms/anthropic/messages (#48510) 2026-10-27 10:08:25 -07:00
__init__.py test(unit): add package markers to migrated unit test directories 2026-09-20 11:53:14 +00:00
anthropic_docs_refusal.py fix(anthropic): keep refusal stop_reason and stop_details on the logged response (#46104) 2026-10-14 14:42:49 -07:00
test_anthropic_common_utils.py fix(anthropic): log the advisor blocks drop_params drops, and skip turns with none (#55260) 2026-12-01 01:34:17 +00:00
test_anthropic_count_tokens_transformation.py fix(anthropic): log the advisor blocks drop_params drops, and skip turns with none (#55260) 2026-12-01 01:34:17 +00:00
test_anthropic_files_and_batches.py feat(anthropic): workload identity federation and pluggable identity sources (#44448) 2026-10-03 17:08:30 -07:00
test_anthropic_output_format_filter.py fix(bedrock): use native structured output on Haiku 5.5 and Sonnet 5.5, and fix Fable 5 and Sonnet 4.6 schema 400s (#46870) 2026-10-16 20:57:23 -07:00
test_anthropic_prompt_cache_prediction.py fix(anthropic)!: map reasoning effort none to supported thinking modes (#55848) 2026-12-02 23:33:35 +00:00
test_anthropic_prompt_cache_pricing.py refactor(anthropic): move prompt cache pricing helper out of the proxy package (#45753) 2026-10-10 20:32:34 +00:00
test_anthropic_reasoning_effort.py fix(anthropic)!: map reasoning effort none to supported thinking modes (#55848) 2026-12-02 23:33:35 +00:00
test_anthropic_schema_filter.py fix(bedrock): use native structured output on Haiku 5.5 and Sonnet 5.5, and fix Fable 5 and Sonnet 4.6 schema 400s (#46870) 2026-10-16 20:57:23 -07:00
test_anthropic_structured_output.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_anthropic_wif.py fix(anthropic): exchange Google identity tokens again on refresh and read oidc/ references out of ANTHROPIC_IDENTITY_TOKEN (#50583) 2026-11-07 16:48:48 -08:00
test_azure_ai_cache_pricing.py test: move tests/test_litellm/llms into tests/unit/llms (#43191) 2026-09-25 12:43:23 -07:00
test_cost_calculation_dict_safety.py feat(anthropic): workload identity federation and pluggable identity sources (#44448) 2026-10-03 17:08:30 -07:00
test_count_tokens_oauth.py fix(count_tokens): count a history that carries a compaction block (#44784) 2026-10-30 00:11:55 -07:00
test_message_sanitization.py fix(bedrock): stop the prefill 400 when the last user message is empty (#50701) 2026-11-18 03:44:11 +00:00
test_messages_http_error_retry_cases.py fix(anthropic): keep caller tool_use ids unless the upstream rejects them (#54468) 2026-11-26 05:55:01 +00:00