From 8092ed6b0aa1de54410a91dff6ddb84809396377 Mon Sep 17 00:00:00 2001 From: jmxjiamingxu <1040647315@qq.com> Date: Sun, 30 Aug 2026 14:20:16 +0800 Subject: [PATCH] style(bedrock): mark the freeform toolSpec schema dicts for the budget gate --- litellm/litellm_core_utils/prompt_templates/factory.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/litellm/litellm_core_utils/prompt_templates/factory.py b/litellm/litellm_core_utils/prompt_templates/factory.py index 9dfadbbd9b6..72a7b58e39c 100644 --- a/litellm/litellm_core_utils/prompt_templates/factory.py +++ b/litellm/litellm_core_utils/prompt_templates/factory.py @@ -5080,7 +5080,10 @@ def _bedrock_tools_pt(tools: list, model: str | None = None) -> list[BedrockTool freeform_name = tool.get("name") if not (isinstance(freeform_name, str) and freeform_name.strip()): continue - parameters = {"type": "object", "properties": {}} + parameters = { # mutable-ok: Bedrock toolSpec input schemas are plain JSON dicts + "type": "object", + "properties": {}, # mutable-ok: empty JSON schema object, consumed by the request builder + } raw_name = freeform_name _tool_description = tool.get("description", None) elif isinstance(tool, dict) and "function" not in tool and "input_schema" not in tool: