Skip to content

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]

Fix mypy type annotations in transformation.py

Tim Elfrink7538fc0def21
diff --git a/litellm/llms/bedrock/count_tokens/transformation.py b/litellm/llms/bedrock/count_tokens/transformation.py
index 91ffcdcf447..d46ed3aa452 100644
--- a/litellm/llms/bedrock/count_tokens/transformation.py
+++ b/litellm/llms/bedrock/count_tokens/transformation.py
@@ -92,7 +92,7 @@ class BedrockCountTokensConfig(BaseAWSLLM):
system_messages.append({"text": message.get("content", "")})
else:
# Transform message content to Bedrock format
- transformed_message = {"role": message.get("role"), "content": []}
+ transformed_message: Dict[str, Any] = {"role": message.get("role"), "content": []}
# Handle content - ensure it's in the correct array format
content = message.get("content", "")