litellm - 💡(How to fix) Fix [Bug]: Duplicate Usage Aggregation Across Billing Cycles (April/May)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

Usage data from April 30th is being double-counted. It is correctly attributed to the April budget but is also incorrectly surfacing in the May budget total, leading to "pre-exhausted" balances for the current month. Problem Description The budget tracking system is failing to reset the "Month-to-Date" (MTD) counter at the start of the new billing cycle. Specifically, the token/spend spikes recorded on April 30th have carried over and are being aggregated into the May 1st totals.

<img width="1453" height="245" alt="Image" src="https://github.com/user-attachments/assets/91ae8a1f-6752-4d5e-841a-97e7652629c2" /> <img width="1414" height="215" alt="Image" src="https://github.com/user-attachments/assets/49a54f5b-6061-4456-bed0-12fa85758242" />

Expected Behavior: May 1st should begin with a $0.00 (or 0 token) baseline, reflecting only usage occurring within the calendar month of May.

Actual Behavior: May's total includes the final 24 hours of April's usage, causing users to exceed or approach budget limits prematurely.

Steps to Reproduce

  1. Navigate to the Billing/Usage Dashboard.
  2. Set the date filter to April; note the usage on the 30th.
  3. Switch the date filter to May.
  4. Observe that the "Current Spend" for May includes the value from April 30th.

Relevant log output

What part of LiteLLM is this about?

UI Dashboard

What LiteLLM version are you on ?

v1.83.7

Twitter / LinkedIn details

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Bug]: Duplicate Usage Aggregation Across Billing Cycles (April/May)