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: add missing Dict/Optional imports in ChatGPT streaming_utils
Chesars5495003e6058
diff --git a/litellm/llms/chatgpt/chat/streaming_utils.py b/litellm/llms/chatgpt/chat/streaming_utils.pyindex 730becb06e6..3232b452a37 100644--- a/litellm/llms/chatgpt/chat/streaming_utils.py+++ b/litellm/llms/chatgpt/chat/streaming_utils.py@@ -4,7 +4,7 @@ Streaming utilities for ChatGPT provider.Normalizes non-spec-compliant tool_call chunks from the ChatGPT backend API."""-from typing import Any+from typing import Any, Dict, Optionalclass ChatGPTToolCallNormalizer:diff --git a/tests/test_litellm/litellm_core_utils/test_streaming_handler.py b/tests/test_litellm/litellm_core_utils/test_streaming_handler.pyindex 153ca5d5aab..72a7c6fc9a1 100644--- a/tests/test_litellm/litellm_core_utils/test_streaming_handler.py+++ b/tests/test_litellm/litellm_core_utils/test_streaming_handler.py@@ -1274,6 +1274,7 @@ def test_usage_chunk_after_finish_reason_updates_hidden_params(logging_obj):assert hidden_usage.completion_tokens == 135, (f"Expected completion_tokens=135 from provider, got {hidden_usage.completion_tokens}")+@pytest.mark.asyncioasync def test_custom_stream_wrapper_aclose():"""Test that aclose() delegates to the underlying completion_stream's aclose()"""