litellm/tests/test_litellm/llms/bedrock
ishaan-berri f9ba70d357
fix(bedrock-mantle): use /anthropic/v1/messages path for Mantle endpo… (#27976)
* fix(bedrock-mantle): use /anthropic/v1/messages path for Mantle endpoint (#27943)

* docs: add one-line docstring to _disable_debugging (#27894)

Squash-merged by litellm-agent from oss-agent-shin's PR.

* Add jp. Bedrock cross-region inference profile for claude-sonnet-4-6 (#27831)

Squash-merged by litellm-agent from Cyberfilo's PR.

* Sanitize empty text content blocks on /v1/messages (#27832)

Squash-merged by litellm-agent from Cyberfilo's PR.

* fix(bedrock-mantle): use /anthropic/v1/messages path for Mantle endpoint

The bedrock-mantle gateway (Claude Mythos Preview) serves the Anthropic
Messages API at /anthropic/v1/messages; /v1/messages returns 404 Not
Found. Both AmazonMantleConfig (chat/completions caller route) and
AmazonMantleMessagesConfig (anthropic-messages caller route) hardcoded
the wrong path, so every Mantle request 404'd before reaching the model.

Per the Anthropic docs: "[Claude in Amazon Bedrock] uses the Messages
API at /anthropic/v1/messages with SSE streaming."
https://platform.claude.com/docs/en/api/claude-on-amazon-bedrock

Confirmed independently against the live endpoint:
  /v1/chat/completions      -> 200 OK
  /v1/messages              -> 404 Not Found  (what litellm used)
  /anthropic/v1/messages    -> 200 OK         (Claude only)

Adds a regression test asserting both Mantle configs build the
/anthropic/v1/messages path, and updates the existing assertions that
encoded the wrong path.

---------

Co-authored-by: oss-agent-shin <ext-agent-shin@berri.ai>
Co-authored-by: Filippo Menghi <113345637+Cyberfilo@users.noreply.github.com>

* fix: sanitize empty text blocks in sync anthropic_messages_handler path

Co-authored-by: Yassin Kortam <yassin@berri.ai>

---------

Co-authored-by: João Costa <13508071+jpv-costa@users.noreply.github.com>
Co-authored-by: oss-agent-shin <ext-agent-shin@berri.ai>
Co-authored-by: Filippo Menghi <113345637+Cyberfilo@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Yassin Kortam <yassin@berri.ai>
2026-05-15 13:31:59 -07:00
..
batches feat(batch-job): bedrock batch model invocation job retrieval (#26834) 2026-05-11 13:22:26 -07:00
chat refactor: remove unnecessary comments from #27074 2026-05-04 19:34:56 +00:00
count_tokens fix: encode upstream URL path identifiers 2026-04-29 22:02:39 -07:00
embed style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
files harden cloud file compatibility path 2026-05-01 18:14:36 -07:00
image style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
image_edit Litellm ishaan april1 try2 (#25110) 2026-04-03 14:57:44 -07:00
invoke_agent fix: cover provider path traversal variants 2026-04-29 22:29:09 -07:00
messages/invoke_transformations fix(bedrock/messages): preserve compact_20260112 context_management on /v1/messages (#27534) 2026-05-09 20:26:37 +00:00
passthrough style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
realtime style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
rerank style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
vector_stores fix: encode upstream URL path identifiers 2026-04-29 22:02:39 -07:00
test_anthropic_beta_support.py fix(bedrock): allowlist Bedrock Invoke body fields and filter all anthropic-beta values 2026-04-21 11:26:15 -07:00
test_base_aws_llm.py refactor(BaseAWSLLM): implement shared IAM cache and static credentia… (#27125) 2026-05-05 16:47:47 -07:00
test_bedrock_common_utils.py Refactor Bedrock response stream shape handling (#27257) 2026-05-06 17:39:38 -07:00
test_bedrock_ssl_verify.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_claude_platform_provider.py Add Bedrock Claude Platform route (#27678) 2026-05-11 15:50:54 -07:00
test_cross_region_inference_profile_mapping.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_mantle.py fix(bedrock-mantle): use /anthropic/v1/messages path for Mantle endpo… (#27976) 2026-05-15 13:31:59 -07:00