From 7538fc0def21e0207d8ba76d0dcdcdc00f86e1c6 Mon Sep 17 00:00:00 2001 From: Tim Elfrink Date: Thu, 18 Sep 2025 08:34:05 +0200 Subject: [PATCH] Fix mypy type annotations in transformation.py - Add explicit type annotation for transformed_message dict - Resolves mypy errors while maintaining functionality - All tests continue to pass --- litellm/llms/bedrock/count_tokens/transformation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/bedrock/count_tokens/transformation.py b/litellm/llms/bedrock/count_tokens/transformation.py index 91ffcdcf44..d46ed3aa45 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", "")