litellm/tests/unit/llms/bedrock/messages
norkelbyte d8f6963457
fix(bedrock): stop naming typed tools on Bedrock invoke /v1/messages so toolset entries reach Claude (#51756)
* fix(bedrock): stop naming typed tools on Bedrock invoke /v1/messages so toolset entries reach Claude

A computer_toolset or browser_toolset entry carries no name, and Bedrock
refuses any name on one, so the placeholder name LiteLLM added for nameless
tools turned every toolset request into a 400. Only custom tools get the
placeholder now. Typed tools pass through as the caller sent them.

* test(bedrock): cover dated tools in the custom-only tool naming test

* fix(bedrock): name only custom tools in the Rust Bedrock invoke /v1/messages transform

Main now serves Bedrock invoke /v1/messages from Rust, whose port of
ensure_bedrock_anthropic_messages_tool_names still named every unnamed tool,
so toolset entries kept getting litellm_unnamed_tool_N and Bedrock answered 400

* test(bedrock): use rstest for the custom tool naming test

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-11-24 02:44:38 -08:00
..
invoke_transformations fix(bedrock): stop naming typed tools on Bedrock invoke /v1/messages so toolset entries reach Claude (#51756) 2026-11-24 02:44:38 -08:00
__init__.py