From 37ee0468fef81bf800c9284ae2150b8a1f35d8fa Mon Sep 17 00:00:00 2001 From: jmxjiamingxu <1040647315@qq.com> Date: Sun, 30 Aug 2026 13:35:17 +0800 Subject: [PATCH] test(bedrock): cover nameless custom tool drop --- .../test_litellm_core_utils_prompt_templates_factory.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_litellm/litellm_core_utils/prompt_templates/test_litellm_core_utils_prompt_templates_factory.py b/tests/test_litellm/litellm_core_utils/prompt_templates/test_litellm_core_utils_prompt_templates_factory.py index 5780a1bea6b..4ab828130f3 100644 --- a/tests/test_litellm/litellm_core_utils/prompt_templates/test_litellm_core_utils_prompt_templates_factory.py +++ b/tests/test_litellm/litellm_core_utils/prompt_templates/test_litellm_core_utils_prompt_templates_factory.py @@ -1057,11 +1057,13 @@ def test_bedrock_tools_pt_forwards_freeform_tool_without_custom_field(): def test_bedrock_tools_pt_still_drops_unnamed_builtin_tools(): """Responses built-in tools (web_search, image_generation, ...) have no top-level - name and no Bedrock toolSpec equivalent; they must stay dropped. + name and no Bedrock toolSpec equivalent; they must stay dropped. A `custom`-typed + tool without a name is equally unmappable — only a named one is forwarded. """ tools = [ {"type": "web_search_preview"}, {"type": "image_generation"}, + {"type": "custom"}, ] assert _bedrock_tools_pt(tools, model="us.anthropic.claude-sonnet-5") == []