litellm/tests/pass_through_tests
Yuneng Jiang 9c0b73e5f4
[Fix] should_create_missing_views returns False for reltuples=0 (falsy zero bug)
`should_create_missing_views()` had `and result[0]["reltuples"]` which is
falsy when reltuples=0. On a fresh empty PostgreSQL table, CREATE INDEX sets
reltuples=0, causing the guard to return False and skip view creation entirely.
Views like MonthlyGlobalSpendPerKey are never created, and the
/global/spend/logs endpoint returns 500.

Fix: change to `and result[0]["reltuples"] is not None` so reltuples=0
(empty table) and reltuples=-1 (unanalyzed table) both correctly return True.

Also harden test_vertex_ai.py to return None instead of crashing with
JSONDecodeError when the spend-logs endpoint returns a non-JSON 500 response,
and add unit tests covering all three reltuples branches (0, -1, positive).
2026-04-18 11:00:09 -07:00
..
ruby_passthrough_tests
base_anthropic_messages_test.py FIx: replace deprecated claude-3-7-sonnet-20250219 with claude-4-sonnet-20250514 2026-02-20 17:27:59 -08:00
test_anthropic_passthrough_basic.py test_anthropic_messages_to_wildcard_model 2026-01-07 15:03:06 +05:30
test_anthropic_passthrough_python_sdkpy fix test claude-sonnet-4-5-20250929 2025-10-31 18:13:29 -07:00
test_anthropic_passthrough.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_assembly_ai.py use mock tests for assembly AI 2026-03-30 19:59:32 -07:00
test_gemini_with_spend.test.js fix(test): add spend data polling + graceful skip to Gemini e2e spend tests (#22446) 2026-02-28 14:51:28 -08:00
test_gemini.js
test_hosted_vllm_passthrough.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_local_gemini.js fix passthru tests 2025-09-27 14:24:55 -07:00
test_local_vertex.js fix: move to new vertex credentials 2026-03-30 19:16:05 -07:00
test_mcp_routes.py
test_openai_assistants_passthrough.py fix: always retain config models 2025-10-11 16:09:33 -07:00
test_vertex_ai.py [Fix] should_create_missing_views returns False for reltuples=0 (falsy zero bug) 2026-04-18 11:00:09 -07:00
test_vertex_with_spend.test.js fix: move to new vertex credentials 2026-03-30 19:16:05 -07:00
test_vertex.test.js Litellm fix update bedrock models (#24947) 2026-04-01 19:22:54 -07:00
vertex_key.json test: update to new vertex ai keys 2026-03-28 20:19:05 -07:00