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: mypy errors
Sameer Kankute501c2d522bec
diff --git a/litellm/completion_extras/litellm_responses_transformation/transformation.py b/litellm/completion_extras/litellm_responses_transformation/transformation.pyindex 585454f944b..af8185aa215 100644--- a/litellm/completion_extras/litellm_responses_transformation/transformation.py+++ b/litellm/completion_extras/litellm_responses_transformation/transformation.py@@ -31,6 +31,7 @@ from litellm.llms.base_llm.bridges.completion_transformation import (CompletionTransformationBridge,)from litellm.types.llms.openai import (+ ChatCompletionAnnotation,ChatCompletionToolParamFunctionChunk,Reasoning,ResponsesAPIOptionalRequestParams,@@ -778,7 +779,7 @@ class LiteLLMResponsesTransformationHandler(CompletionTransformationBridge):@staticmethoddef _convert_annotations_to_chat_format(annotations: Optional[List[Any]],- ) -> Optional[List[Dict[str, Any]]]:+ ) -> Optional[List["ChatCompletionAnnotation"]]:"""Convert annotations from Responses API to Chat Completions format.@@ -788,7 +789,7 @@ class LiteLLMResponsesTransformationHandler(CompletionTransformationBridge):if not annotations:return None- result: List[Dict[str, Any]] = []+ result: List[ChatCompletionAnnotation] = []for annotation in annotations:try:# Convert Pydantic models to dicts (handles both v1 and v2)@@ -803,7 +804,7 @@ class LiteLLMResponsesTransformationHandler(CompletionTransformationBridge):verbose_logger.debug(f"Skipping unsupported annotation type: {type(annotation)}")continue- result.append(annotation_dict)+ result.append(annotation_dict) # type: ignoreexcept Exception as e:# Skip malformed annotationsverbose_logger.debug(f"Skipping malformed annotation: {annotation}, error: {e}")