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] Responses bridge variable mismatch and outdated CI tests
yuneng-jiang6abdf5addefb
diff --git a/litellm/main.py b/litellm/main.pyindex 3b1f5dc96f5..a9a1c38e3ff 100644--- a/litellm/main.py+++ b/litellm/main.py@@ -1613,7 +1613,7 @@ def completion( # type: ignore # noqa: PLR0915)## RESPONSES API BRIDGE LOGIC ## - check if model has 'mode: responses' in litellm.model_cost map- model_info, model = responses_api_bridge_check(+ responses_api_model_info, model = responses_api_bridge_check(model=model,custom_llm_provider=custom_llm_provider,web_search_options=web_search_options,diff --git a/tests/local_testing/test_anthropic_prompt_caching.py b/tests/local_testing/test_anthropic_prompt_caching.pyindex 417a7335a8a..b3be5729e57 100644--- a/tests/local_testing/test_anthropic_prompt_caching.py+++ b/tests/local_testing/test_anthropic_prompt_caching.py@@ -151,6 +151,7 @@ async def test_litellm_anthropic_prompt_caching_tools():},"required": ["location"],},+ "type": "custom",}],"max_tokens": 64000,diff --git a/tests/proxy_e2e_anthropic_messages_tests/test_claude_agent_sdk.py b/tests/proxy_e2e_anthropic_messages_tests/test_claude_agent_sdk.pyindex 8e8033d885f..4b72eb7a6c7 100644--- a/tests/proxy_e2e_anthropic_messages_tests/test_claude_agent_sdk.py+++ b/tests/proxy_e2e_anthropic_messages_tests/test_claude_agent_sdk.py@@ -110,8 +110,8 @@ async def test_claude_agent_sdk_streaming(litellm_proxy_config, model_name, mode# Note: Very short responses might come in 1 chunk, so we just verify we got contentassert len(received_chunks) > 0, f"No chunks received from {model_name}"- # Verify response contains expected content (case insensitive)- assert "hello" in full_response.lower(), f"Response doesn't contain expected greeting: {full_response}"+ # Verify response is non-empty (don't assert on specific LLM content — it's non-deterministic)+ assert len(full_response.strip()) > 0, f"Empty response received from {model_name}"print(f"✅ Test passed for {model_name}")diff --git a/tests/test_litellm/integrations/focus/test_vantage_destination.py b/tests/test_litellm/integrations/focus/test_vantage_destination.pyindex c3fa9bda63d..998b447aeb8 100644--- a/tests/test_litellm/integrations/focus/test_vantage_destination.py+++ b/tests/test_litellm/integrations/focus/test_vantage_destination.py@@ -100,8 +100,9 @@ async def test_should_upload_csv_to_correct_url():async def test_should_batch_large_content():dest = FocusVantageDestination(prefix="exports", config=_config())- # Create content larger than 2 MB- header = b"col1,col2,col3"+ # Create content larger than 2 MB — use supported column names so+ # _strip_unsupported_columns does not remove them.+ header = b"ChargeCategory,ChargePeriodStart,BilledCost"row = b"a" * 100 + b"," + b"b" * 100 + b"," + b"c" * 100num_rows = (VANTAGE_MAX_BYTES_PER_UPLOAD // len(row)) + 100large_content = header + b"\n" + b"\n".join([row] * num_rows) + b"\n"@@ -119,8 +120,8 @@ async def test_should_batch_large_content():async def capture_post(url, **kwargs):files = kwargs.get("files", {})- if "file" in files:- upload_calls.append(files["file"][1])+ if "csv" in files:+ upload_calls.append(files["csv"][1])return mock_responsemock_client.post = capture_post@@ -144,7 +145,7 @@ async def test_should_batch_by_row_count():"""Verify batching triggers when row count exceeds 10K even if under 2 MB."""dest = FocusVantageDestination(prefix="exports", config=_config())- header = b"col1"+ header = b"ChargeCategory"# Short rows so total size stays well under 2 MBrow = b"x"num_rows = VANTAGE_MAX_ROWS_PER_UPLOAD + 500@@ -165,8 +166,8 @@ async def test_should_batch_by_row_count():async def capture_post(url, **kwargs):files = kwargs.get("files", {})- if "file" in files:- upload_calls.append(files["file"][1])+ if "csv" in files:+ upload_calls.append(files["csv"][1])return mock_responsemock_client.post = capture_post