[Fix] Responses bridge variable mismatch and outdated CI tests

Fix genuine regression in responses_api_bridge_check where the second
call assigned to `model_info` instead of `responses_api_model_info`,
preventing gpt-5.4 + tools + reasoning_effort from routing to the
Responses API bridge.

Also update outdated tests:
- Vantage tests: match "csv" file key and use supported column names
- Anthropic caching test: add "type": "custom" to expected tool payload
- Claude Agent SDK test: remove non-deterministic LLM content assertion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
yuneng-jiang
2026-03-14 12:12:35 -07:00
co-authored by Claude Opus 4.6
parent 24ae5cc397
commit 6abdf5adde
4 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -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,
@@ -151,6 +151,7 @@ async def test_litellm_anthropic_prompt_caching_tools():
},
"required": ["location"],
},
"type": "custom",
}
],
"max_tokens": 64000,
@@ -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 content
assert 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}")
@@ -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" * 100
num_rows = (VANTAGE_MAX_BYTES_PER_UPLOAD // len(row)) + 100
large_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_response
mock_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 MB
row = 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_response
mock_client.post = capture_post