The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Fix prompt factory
Sameer Kankuted2346b525912
diff --git a/litellm/litellm_core_utils/prompt_templates/factory.py b/litellm/litellm_core_utils/prompt_templates/factory.pyindex 4ef08b0a01f..ba840bc3d89 100644--- a/litellm/litellm_core_utils/prompt_templates/factory.py+++ b/litellm/litellm_core_utils/prompt_templates/factory.py@@ -4042,13 +4042,9 @@ def _convert_to_bedrock_tool_call_result(tool_result_content_blocks.append(BedrockToolResultContentBlock(image=_block["image"]))- elif content["type"] == "document":- _doc_block = BedrockConverseMessagesProcessor._process_document_message(- content- )- if "document" in _doc_block:- tool_result_content_blocks.append(- BedrockToolResultContentBlock(document=_doc_block["document"])+ elif "document" in _block:+ tool_result_content_blocks.append(+ BedrockToolResultContentBlock(document=_block["document"]))else:verbose_logger.warning(@@ -4094,6 +4090,7 @@ def _convert_to_bedrock_tool_call_result("%s for file tool-result block %s; dropping.",list(_file_block.keys()),content,+ )message.get("name", "")id = str(message.get("tool_call_id", str(uuid.uuid4())))