litellm/litellm/llms/bedrock
owen-hj 43bde63432
fix(bedrock): send pass-through calls the model id chat completions sends (#53836)
* fix(router): strip the Bedrock route marker from the model in pass-through paths

A router model on a bedrock/invoke/ or bedrock/converse/ deployment sent
/model/invoke/<model id>/<action> upstream on /bedrock/model/<group>/...,
which Bedrock answers with UnknownOperationException. The rewrite now drops
the same routing prefixes the chat invoke path drops.

* fix(router): strip the Bedrock route marker from the model in pass-through paths

* test(router): pin the pass-through model path at the router core for Bedrock route markers and other providers

Bedrock invoke and converse deployments must send the bare model id, a hosted_vllm deployment keeps its full provider model, and a model no provider resolves is sent as written

* fix(bedrock): send chat's model id on pass-through and log spend for route-pinned models

Pass-through paths for Bedrock deployments now drop a region path and resolve
latest aliases like chat does, every Bedrock ARN gets its resource slash
encoded, and a converse reply on an invoke-pinned deployment is logged with the
converse parser so its spend row is written

* fix(bedrock): build the pass-through model id with chat's builder and encode custom model ARNs

* fix(bedrock): price invoke replies on application profile ARNs by their base model

* fix(passthrough): keep the pass-through ARN form and price streamed invoke replies on app profile ARNs by base_model

* test(bedrock): cover custom model ARN encoding on the bedrock/openai chat route

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-25 18:42:28 -08:00
..
audio_transcription refactor(rust_bridge): route every Rust-to-Python call through host modules (#50822) 2026-11-11 01:57:54 +00:00
batches fix(batches): keep the endpoint a batch was created for on retrieve, cancel and cost polling (#50784) 2026-11-24 05:42:08 -08:00
chat fix(gateway): serve messages drop, summary and timeout settings like Python (#51236) 2026-11-25 09:26:12 +00:00
claude_platform chore(types): type optional_params and litellm_params as dict[str, object] across provider method families (#54175) 2026-11-24 14:40:37 +00:00
count_tokens fix(token_counter): count an Anthropic fallback block as zero on every count route (#54006) 2026-11-24 03:32:34 -08:00
embed fix(embeddings): send request-shaped extra_body fields at the provider's documented path (#54273) 2026-11-25 13:29:52 -08:00
files refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
image_edit refactor(types): replace Unknown with proven types in 131 more files (#54119) 2026-11-24 02:26:51 -08:00
image_generation refactor(types): annotate repeated bare-container parameters across method families (#54268) 2026-11-24 14:13:19 -08:00
messages refactor(types): give bare dict, list and tuple returns proven types in 133 files (#54321) 2026-11-25 01:30:02 +00:00
passthrough fix(bedrock): send pass-through calls the model id chat completions sends (#53836) 2026-11-25 18:42:28 -08:00
realtime fix(realtime): enforce TPM limits during realtime sessions (#53689) 2026-11-24 05:15:04 -08:00
rerank chore(types): type optional_params and litellm_params as dict[str, object] across provider method families (#54175) 2026-11-24 14:40:37 +00:00
responses refactor(types): annotate repeated bare-container parameters across method families (#54268) 2026-11-24 14:13:19 -08:00
search refactor(types): replace Unknown with proven types in 162 more files (#54089) 2026-11-23 22:58:19 -08:00
vector_stores refactor(types): replace Unknown with proven types in 131 more files (#54119) 2026-11-24 02:26:51 -08:00
base_aws_llm.py fix(bedrock): send pass-through calls the model id chat completions sends (#53836) 2026-11-25 18:42:28 -08:00
common_utils.py refactor(types): give bare dict, list and set returns, locals and constants proven types in 77 files (#54343) 2026-11-25 03:47:36 +00:00
cost_calculation.py feat(cost): price Claude token calls, budget holds and auth price checks in Rust (#52484) 2026-11-23 22:00:28 +00:00
guardrail_attachments.py fix(guardrails): scan or refuse attachments in the bedrock guardrail (#43383) 2026-10-10 16:48:37 -07:00
guardrail_tool_calls.py fix(guardrails)!: close gaps in bedrock tool call and tool description scans (#54169) 2026-11-25 06:56:15 +00:00
model_listing.py fix(bedrock): discover models through the configured control-plane endpoint (#50840) 2026-11-24 14:09:25 -08:00
request_metadata.py fix(bedrock)!: apply the deployment guardrailConfig on /bedrock pass-through routes (#47429) 2026-10-20 14:48:19 -07:00
session_identity.py feat(bedrock): derive STS session tags and session name from caller identity (#52978) 2026-11-19 17:11:09 -08:00
web_identity_session_policy.py feat(control_plane): s3 object lock audit sink (#49661) 2026-11-16 17:36:25 +00:00