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 pass through tests
Sameer Kankute143e8dfe276c
diff --git a/litellm/litellm_core_utils/realtime_streaming.py b/litellm/litellm_core_utils/realtime_streaming.pyindex c5e0d1f26ae..f146b20cf21 100644--- a/litellm/litellm_core_utils/realtime_streaming.py+++ b/litellm/litellm_core_utils/realtime_streaming.py@@ -155,7 +155,7 @@ class RealTimeStreaming:event_type== "conversation.item.input_audio_transcription.completed"):- transcript = event_obj.get("transcript", "")+ transcript = cast(str, event_obj.get("transcript", ""))if transcript:self.input_messages.append({"role": "user", "content": transcript}@@ -170,7 +170,7 @@ class RealTimeStreaming:try:if event_obj.get("type") != "response.done":return- response = event_obj.get("response", {})+ response = cast(Dict[str, Any], event_obj.get("response", {}))for item in response.get("output", []):if item.get("type") == "function_call":self.tool_calls.append(diff --git a/tests/test_litellm/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py b/tests/test_litellm/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.pyindex cac8f98cbb7..fdc821ef8bb 100644--- a/tests/test_litellm/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py+++ b/tests/test_litellm/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py@@ -224,6 +224,7 @@ class TestVertexAIPassThroughHandler:# Mock requestmock_request = Mock()+ mock_request.state = None # Prevent Mock from returning a truthy _cached_headersmock_request.method = "POST"mock_request.headers = {"Authorization": "Bearer test-creds",@@ -323,6 +324,7 @@ class TestVertexAIPassThroughHandler:# Mock requestmock_request = Mock()+ mock_request.state = None # Prevent Mock from returning a truthy _cached_headersmock_request.method = "POST"mock_request.headers = {"Authorization": "Bearer test-creds",@@ -905,6 +907,7 @@ class TestVertexAIDiscoveryPassThroughHandler:# Mock requestmock_request = Mock()+ mock_request.state = None # Prevent Mock from returning a truthy _cached_headersmock_request.method = "POST"mock_request.headers = {"Authorization": "Bearer test-key",