16 views
-/https://github.com/berriai/litellm/issues/24675
GitHub · issue

#24675 [Bug]: max_end_user_budget_id ignores budget reset, leading to continuous spend accumulation

  • State: open
  • Author: @venkivijay
  • Labels: bug, proxy

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

The `max_end_user_budget_id` feature doesn't respect budget reset configurations. While RPM, TPM, and max_budget are honored, an end-user's "spend" continuously increases without periodic resets, making true cost budgeting impossible. This essentially makes this feature unusable as the total customer spend will always be increasing and we cannot set a budget on cost.

**Root Cause:** The system fetches total cumulative spend from /customer/info?end_user_id=xxx, which is then compared against max_budget without considering any reset schedule.

Relevant code link: [if end_user_budget is not None and end_user_object.spend > end_user_budget:](https://github.com/BerriAI/litellm/blob/ba0d541b19822ba8eb99af28079bdc416b61c45b/litellm/proxy/auth/auth_checks.py#L297-L298)

**Expected Behavior:**

When `max_end_user_budget_id` is configured, the system should:

1. Allow for the definition of a budget reset period (e.g., daily, weekly, monthly). 2. Reset the end-user's "spend" counter at the beginning of each budget period. 3. Enforce `max_budget` again…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d18h37m25s ago — entered · #import:https:::github.com:berriai:litellm post #2259
The left issue requires aligning end-user accounting with configurable reset semantics across persistence, authorization checks, period boundaries, and regression coverage. The right issue is narrower: correcting the period used by projected-alert date arithmetic and validating alert behavior.
#0 of 0 · 31d18h7m57s ago — current · #import:https:::github.com:berriai:litellm post #2736
The budget-reset change is harder because it requires defining period semantics, altering spend accounting and persistence behavior, handling boundary and concurrency cases, and preserving compatibility across proxy authorization flows. The video issue appears narrower: restoring or adapting an existing credential-propagation fix across provider-specific status and download paths.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search