litellm/tests/test_litellm/llms/anthropic/chat
Abhimanyu Kapur 831dbbc4df fix(anthropic): translate raw adaptive thinking for chat completions on pre-4.6 models
Clients that pass thinking={"type": "adaptive"} directly (not via the
reasoning_effort alias) on the /chat/completions interface had it forwarded
unmodified to pre-4.6 Anthropic models, which reject the shape. Mirrors the
translation already applied on the native /v1/messages passthrough (#32867):
translate to legacy thinking={type: enabled, budget_tokens}, capped below
max_tokens, dropping thinking when max_tokens can't fit even the minimum
budget. Hoists the shared budget-capping helper onto AnthropicConfig so both
paths use one implementation.
2026-07-11 14:20:48 -07:00
..
guardrail_translation style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
conftest.py refactor: remove unnecessary comments from #27074 2026-05-04 19:34:56 +00:00
test_anthropic_chat_handler.py chore: litellm oss staging (#31185) 2026-06-26 09:17:44 -07:00
test_anthropic_chat_transformation.py fix(anthropic): translate raw adaptive thinking for chat completions on pre-4.6 models 2026-07-11 14:20:48 -07:00
test_code_interpreter_results_extraction.py fix: streaming container_id and consistent Pydantic types in output 2026-03-18 12:37:13 +01:00