litellm/tests/test_litellm/proxy/spend_tracking
Yuneng Jiang 2047446546
Scope NULLS LAST to ttft_ms only
The previous version appended NULLS LAST to every ORDER BY, which would
silently change DESC semantics for any nullable sort column added to the
whitelist later. Today the existing sort columns (spend, total_tokens,
startTime, endTime, request_duration_ms, model) are all non-null in the
result set, so the clause is a no-op for them — but the broader form is
misleading.

Apply NULLS LAST only when sorting by ttft_ms (the only column whose
computed expression actually produces NULLs). Update the model test to
assert the clause is absent for non-nullable columns.
2026-04-24 22:52:04 -07:00
..
test_cloudzero_endpoints.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_spend_management_endpoints.py Scope NULLS LAST to ttft_ms only 2026-04-24 22:52:04 -07:00
test_spend_query_optimization.py fix(spend): session-TZ-independent date filtering for spend/error log queries 2026-04-10 17:04:52 -07:00
test_spend_tracking_utils.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00