litellm/tests/unit/llms/bedrock
martenj4 521653ca9c
fix(bedrock): name base_model in the thinking.type.enabled 400 for an unresolved application inference profile ARN (#53487)
* fix(bedrock): name base_model in the thinking.type.enabled 400 for an unresolved application inference profile ARN

* fix(bedrock): point the unresolved ARN hint at the profile's own model id

* test(bedrock): cover the base_model example the profile ARN thinking hint suggests

* test(bedrock): check that async calls also keep other Bedrock 400s without the base_model hint

* fix(bedrock): say where to set base_model and add the hint to converse_like profile ARNs

* test(bedrock): expect the profile ARN thinking warning to name model_info.base_model

The warning now tells admins to set model_info.base_model, so the existing test that looked for the bare `base_model` text no longer matched it

* test(bedrock): check converse_like reads base_model before adding the profile ARN hint

A converse_like profile ARN deployment with base_model set now has a case
that expects Bedrock's 400 without the base_model sentence, so passing the
wrong base_model on that call fails a test. Also wraps the warning
assertion that ran past 120 characters

* fix(bedrock): say a system inference profile or foundation model ARN works as base_model in the profile ARN hint

The hint said not to use an ARN, but a system inference profile ARN or a
foundation model ARN resolves as base_model, gets adaptive thinking, and
is priced. Tests send each form, check the application profile's own ARN
still gets the hint, and check the hinted error keeps Bedrock's headers

* fix(bedrock): give the profile ARN thinking warning the same base_model advice as the 400

The proxy log warning still asked for the Bedrock model ID only, while the
400's sentence now also allows a system inference profile or foundation
model ARN. Both now read one shared phrase, and the warning test checks
that the ARN option is in it

* fix(bedrock): tell direct SDK callers to pass base_model in the profile ARN thinking hint

The 400 sentence and the log warning only named the proxy's
model_info.base_model, while a direct litellm.completion call hits the same
rejection and fixes it with the base_model argument. Both now end their
advice with one shared SDK sentence, and a streamed 400 that is not the
enabled thinking rejection is now tested to stay without the hint

* ci: retrigger checks whose approved runs never started

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-12-04 16:22:15 -08:00
..
batches fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
chat fix(bedrock): name base_model in the thinking.type.enabled 400 for an unresolved application inference profile ARN (#53487) 2026-12-04 16:22:15 -08:00
count_tokens fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
embed fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
files fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
image fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
image_edit fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
image_generation refactor(cost): consolidate pricing modules (#56131) 2026-12-04 23:14:04 +00:00
invoke_agent fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
messages fix(anthropic): strip per-message output_config under drop_params for models without per-turn effort (#55803) 2026-12-02 13:39:47 -08:00
passthrough fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
realtime fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
rerank fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
responses fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
search refactor(cost): consolidate pricing modules (#56131) 2026-12-04 23:14:04 +00:00
vector_stores fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
__init__.py test(unit): make every tests/unit directory a package so pytest collection is unique 2026-09-20 11:50:59 +00:00
event_loop_probe.py test(bedrock): detect Vault reads on the event-loop thread (#47597) 2026-10-20 10:45:04 -07:00
slow_upstream.py fix(router)!: bound fake-streamed calls by the request timeout, not stream_timeout (#47162) 2026-10-17 22:08:02 +00:00
test_anthropic_beta_support.py fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
test_base_aws_llm.py fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
test_bedrock_common_utils.py fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
test_bedrock_model_listing.py fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
test_bedrock_ssl_verify.py fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
test_claude_platform_provider.py fix(anthropic): drop unsigned thinking blocks before /v1/messages reaches Claude (#51793) 2026-11-24 05:30:55 +00:00
test_converse_context_management.py fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
test_cross_region_inference_profile_mapping.py refactor(cost): consolidate pricing modules (#56131) 2026-12-04 23:14:04 +00:00
test_guardrail_attachments.py fix(guardrails): scan or refuse attachments in the bedrock guardrail (#43383) 2026-10-10 16:48:37 -07:00
test_mantle.py fix(bedrock): dispatch stored Responses get, cancel, and delete to Bedrock Runtime and Mantle (#56150) 2026-12-04 14:23:54 -08:00
test_nova_imported_models.py fix(bedrock): route a Bedrock model id with no Invoke provider to Converse (#43290) 2026-10-30 06:27:59 -07:00
test_request_metadata.py feat(messages): serve bedrock claude_platform messages on rust only (#52681) 2026-11-19 14:34:02 -08:00
test_session_identity.py feat(bedrock): derive STS session tags and session name from caller identity (#52978) 2026-11-19 17:11:09 -08:00
test_web_identity_session_policy.py fix(bedrock): discover models through the configured control-plane endpoint (#50840) 2026-11-24 14:09:25 -08:00