litellm/tests/test_litellm/llms/custom_httpx
Mateo Wang 26ee5dd597
fix(passthrough): drop top-level additional_drop_params on /v1/messages (#31645)
* fix(passthrough): drop top-level additional_drop_params on /v1/messages

On the Anthropic Messages pass-through path, additional_drop_params only
stripped nested dotted paths, so plain top-level keys like `thinking` and
`context_management` were forwarded to the provider. Bedrock rejects these
with "Extra inputs are not permitted", returning a 400 to Claude App/CLI
even when the user configured `additional_drop_params: ["thinking"]`.

delete_nested_value already handles plain top-level fields, so route every
drop param through it and remove the nested-only filter. Fixes #25931.

* fix(passthrough): drop thinking for bedrock inference-profile ARNs on /v1/messages

Opaque Bedrock Application Inference Profile ARNs contain neither "anthropic"
nor "claude", so is_anthropic_claude_model returned False and the thinking
param was rewritten to reasoning_effort before additional_drop_params ran.
That made additional_drop_params: ["thinking"] a no-op for the converse-ARN
form, and the Bedrock Converse transform re-expanded reasoning_effort back into
additionalModelRequestFields.thinking, so the request 400'd.

Extend the thinking-translation gates to also accept bedrock ARNs via the
existing is_bedrock_arn_model helper, mirroring the cache_control path, so
thinking is preserved as thinking and additional_drop_params can drop it.
2026-06-29 18:17:12 -07:00
..
test_aiohttp_cleanup_closed.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_aiohttp_handler.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_aiohttp_so_keepalive.py fix: added keepalive args for aiohttp tcpconnector 2026-04-29 09:14:57 -07:00
test_aiohttp_transport.py chore: litellm oss 170626 (#30637) 2026-06-17 21:11:12 -07:00
test_credential_leak_prevention.py Litellm agent oss staging 05 11 2026 (#27733) 2026-05-13 14:09:12 -07:00
test_gemini_session_leak.py Fix __main__ exit bug, close litellm_async_client, restore global state 2026-03-14 18:14:42 -07:00
test_http_handler.py fix(router): honor litellm_settings.request_timeout as an independent per-attempt timeout (#31119) 2026-06-23 14:22:54 -07:00
test_llm_http_handler.py fix(passthrough): drop top-level additional_drop_params on /v1/messages (#31645) 2026-06-29 18:17:12 -07:00
test_mock_transport.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00