diff --git a/litellm/main.py b/litellm/main.py index 3b1f5dc96f..a9a1c38e3f 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.py index 417a7335a8..b3be5729e5 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.py index 8e8033d885..4b72eb7a6c 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 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}") diff --git a/tests/test_litellm/integrations/focus/test_vantage_destination.py b/tests/test_litellm/integrations/focus/test_vantage_destination.py index c3fa9bda63..998b447aeb 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" * 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