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: fix linting errors
Krrish Dholakiaee1e9da7b227
diff --git a/litellm/responses/litellm_completion_transformation/streaming_iterator.py b/litellm/responses/litellm_completion_transformation/streaming_iterator.pyindex e0cbea501f9..d3a8cea3497 100644--- a/litellm/responses/litellm_completion_transformation/streaming_iterator.py+++ b/litellm/responses/litellm_completion_transformation/streaming_iterator.py@@ -10,6 +10,7 @@ from litellm.responses.litellm_completion_transformation.transformation import (from litellm.responses.streaming_iterator import ResponsesAPIStreamingIteratorfrom litellm.responses.utils import ResponsesAPIRequestUtilsfrom litellm.types.llms.openai import (+ PART_UNION_TYPES,BaseLiteLLMOpenAIResponseObject,ContentPartAddedEvent,ContentPartDoneEvent,@@ -203,6 +204,7 @@ class LiteLLMCompletionStreamingIterator(ResponsesAPIStreamingIterator):text = getattr(litellm_complete_object.choices[0].message, "content", "") or "" # type: ignorereasoning_content = getattr(litellm_complete_object.choices[0].message, "reasoning_content", "") or "" # type: ignore+ part: Optional[PART_UNION_TYPES] = Noneif reasoning_content:part = ContentPartDonePartReasoningText(type="reasoning_text",diff --git a/litellm/types/llms/openai.py b/litellm/types/llms/openai.pyindex 5306dc8bfc2..c9761beeafc 100644--- a/litellm/types/llms/openai.py+++ b/litellm/types/llms/openai.py@@ -1059,7 +1059,9 @@ class ResponsesAPIResponse(BaseLiteLLMOpenAIResponseObject):parallel_tool_calls: Optional[bool] = Nonetemperature: Optional[float] = Nonetool_choice: Optional[ToolChoice] = None- tools: Optional[Union[List[Tool], List[ResponseFunctionToolCall], List[Dict[str, Any]]]] = None+ tools: Optional[+ Union[List[Tool], List[ResponseFunctionToolCall], List[Dict[str, Any]]]+ ] = Nonetop_p: Optional[float] = Nonemax_output_tokens: Optional[int] = Noneprevious_response_id: Optional[str] = None@@ -1231,16 +1233,19 @@ class ContentPartDonePartReasoningText(BaseLiteLLMOpenAIResponseObject):reasoning: str+PART_UNION_TYPES = Union[+ ContentPartDonePartOutputText,+ ContentPartDonePartRefusal,+ ContentPartDonePartReasoningText,+]++class ContentPartDoneEvent(BaseLiteLLMOpenAIResponseObject):type: Literal[ResponsesAPIStreamEvents.CONTENT_PART_DONE]item_id: stroutput_index: intcontent_index: int- part: Union[- ContentPartDonePartOutputText,- ContentPartDonePartRefusal,- ContentPartDonePartReasoningText,- ]+ part: PART_UNION_TYPESclass OutputTextDeltaEvent(BaseLiteLLMOpenAIResponseObject):