fix: litellm_core_utils/prompt_templates/factory.py:3431

This commit is contained in:
Sameer Kankute
2026-02-02 19:00:12 +05:30
parent 7329fa8e7a
commit b85f1f2e6d
2 changed files with 2 additions and 2 deletions
@@ -3427,7 +3427,7 @@ def _deduplicate_bedrock_content_blocks(
deduplicated: List[BedrockContentBlock] = []
for block in blocks:
keyed = block.get(block_key)
if keyed is not None:
if keyed is not None and isinstance(keyed, dict):
block_id = keyed.get(id_key)
if block_id:
if block_id in seen_ids:
@@ -74,7 +74,7 @@ class AnthropicMessagesHandler(BaseTranslation):
if messages is None:
return data
chat_completion_compatible_request = (
chat_completion_compatible_request, tool_name_mapping = (
LiteLLMAnthropicMessagesAdapter().translate_anthropic_to_openai(
anthropic_message_request=cast(AnthropicMessagesRequest, data)
)