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 the test issue from the pr review
Henry Wang4eee54b15731
diff --git a/tests/test_litellm/google_genai/test_google_genai_adapter.py b/tests/test_litellm/google_genai/test_google_genai_adapter.pyindex 626692cf47d..e8882a1acb3 100644--- a/tests/test_litellm/google_genai/test_google_genai_adapter.py+++ b/tests/test_litellm/google_genai/test_google_genai_adapter.py@@ -1091,7 +1091,7 @@ async def test_google_generate_content_with_openai():)# Use AsyncMock for proper async function mocking- with unittest.mock.patch("litellm.completion", new_callable=unittest.mock.MagicMock) as mock_completion:+ with unittest.mock.patch("litellm.acompletion", new_callable=unittest.mock.AsyncMock) as mock_completion:# Set the return value directly on the MagicMockmock_completion.return_value = mock_response@@ -1100,7 +1100,7 @@ async def test_google_generate_content_with_openai():contents=[{"role": "user", "parts": [{"text": "Hello, world!"}]}],- systemInstruction="You are a helpful assistant.",+ systemInstruction={"parts": [{"text": "You are a helpful assistant."}]},safetySettings=[{"category": "HARM_CATEGORY_HATE_SPEECH",@@ -1199,4 +1199,4 @@ async def test_agenerate_content_x_goog_api_key_header():assert headers.get("Content-Type") == "application/json", f"Expected Content-Type application/json, got {headers.get('Content-Type')}"print(f"✓ Test passed: x-goog-api-key header correctly set to {api_key_value}")- print(f"✓ All headers: {list(headers.keys())}")\ No newline at end of file+ print(f"✓ All headers: {list(headers.keys())}")