mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
GET /v1/tool/spend aggregated LiteLLM_SpendLogToolIndex joined to LiteLLM_SpendLogs with a start_time-only predicate the composite (tool_name, start_time) index cannot serve, and the dedup total query left the outer SpendLogs scan unwindowed, so every dashboard load walked both per-request tables end to end. - clamp the window to the most recent 30 days ending at end_date; the response start_date reflects the effective window and the dashboard notes the clamp - index SpendLogToolIndex on start_time (all schema copies + migration) - window the SpendLogs side of both queries (1s margin: the two writers can disagree by ~1ms on the same request) - expire SpendLogToolIndex rows on the spend-log retention cutoff via a parametrized batch-delete engine shared with the SpendLogs cleanup Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| migrations | ||
| __init__.py | ||
| _logging.py | ||
| schema.prisma | ||
| utils.py | ||