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 lint
Ishaan Jaffer1bb3eabb915e
diff --git a/litellm/llms/azure/responses/transformation.py b/litellm/llms/azure/responses/transformation.pyindex 169e0d5d79f..1516ed089ee 100644--- a/litellm/llms/azure/responses/transformation.py+++ b/litellm/llms/azure/responses/transformation.py@@ -1,4 +1,4 @@-from typing import TYPE_CHECKING, Any, Dict, Literal, Optional, Tuple+from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Tuple, Unionimport httpxfrom openai.types.responses import ResponseReasoningItem@@ -88,12 +88,14 @@ class AzureOpenAIResponsesAPIConfig(OpenAIResponsesAPIConfig):Override parent method to also filter out 'status' field from message items.Azure OpenAI API does not accept 'status' field in input messages."""+ from typing import cast+# First call parent's validationvalidated_input = super()._validate_input_param(input)# Then filter out status from message itemsif isinstance(validated_input, list):- filtered_input = []+ filtered_input: List[Any] = []for item in validated_input:if isinstance(item, dict) and item.get("type") == "message":# Filter out status field from message items@@ -101,7 +103,7 @@ class AzureOpenAIResponsesAPIConfig(OpenAIResponsesAPIConfig):filtered_input.append(filtered_item)else:filtered_input.append(item)- return filtered_input # type: ignore+ return cast(ResponseInputParam, filtered_input)return validated_input