6 views
-/https://github.com/berriai/litellm/issues/35570
GitHub · issue

#35570 [Bug]: Reservation reseed marks actual cost applied without incrementing it

  • State: open
  • Author: @emerzon
  • Labels: proxy

### Check for existing issues

- [x] I searched open and closed issues before filing - [x] [#28283](https://github.com/BerriAI/litellm/issues/28283) concerns unrelated spend-counter inflation and does not cover this reseed branch

### What happened?

When a reserved spend counter disappears, becomes non-numeric, or is reset below the value needed for reconciliation, `_set_reserved_entry_actual_cost` decides that the reservation adjustment cannot be applied

With `reseed_on_inconsistent=True`, it calls `reseed_spend_counter_from_db`. That database value is explicitly documented as a lagging floor because entity spend is flushed asynchronously and can exclude the current request

After reseeding, the function does not increment the counter by the current request's actual cost or reapply the reservation delta. It still sets `entry["applied_adjustment"]` to the target value as though reconciliation succeeded

The caller returns the entry's counter key in `reserved_counter_keys`, so the direct increment path skips that key. The current request's actual cost can therefore be absent from live budget enforcement until a later durable flush and reseed

### Steps to Reproduce

This focused h…

GitHub resolver

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

Refresh page
vote history (1 events)
#0 of 0 · 31d18h33m18s ago — entered · #import:https:::github.com:berriai:litellm post #2414
Issue #24929 is harder because it likely requires tracing long-lived streaming connections, HTTP client lifecycle, timeout behavior, and concurrency across proxy layers, whereas #35570 is a narrower accounting-state correction with a more localized implementation path.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search