﻿# LiteLLM customer budget checks read shared settled spend across workers

Warm different workers, settle synthetic spend elsewhere, then test the next request; distinguish shared settled enforcement from reservation-based prevention of in-flight overshoot.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-agent-litellm-settled-customer-spend-shared-admission/
Language: en

The November 13 LiteLLM v1.111.0-dev.2 prerelease fixes customer requests slipping through stale per-worker spend checks. The request path reads shared settled spend and can reseed missing counters from storage. This is settled-spend enforcement: a request admitted below the ceiling can still finish above it, so the release should not be described as a guarantee that total cost never crosses a configured cap.

## Create stale views before charging

Run two synthetic workers and warm the same customer hierarchy on both. Charge a known amount through one worker, wait for confirmed settlement and request through the other. Record which worker serves each step. This targets the cached-view problem. A single-worker test or balanced sequence can pass without demonstrating that another member’s completed usage becomes visible at the next budget decision elsewhere.

## Separate admission time from completion time

Admit a harmless long request just below the cap and complete it with known usage that crosses the ceiling. Then test a later request after settlement. The existing in-flight request can legitimately cause overshoot under the documented boundary, while the next should receive the budget refusal. Report those outcomes separately instead of using one final amount to claim either perfect reservation or a failed shared-state repair.

## Missing counters require period-correct reseeding

Remove a synthetic shared counter while preserving known persisted spend, then request again. Inspect the reseeded value and its budget period. A recovered amount from the wrong window can either over-restrict or admit too much. Keep reset deadlines controlled and compare organization, team and member cases where used. A successful database lookup alone does not prove the counter describes the current allowance period.

## Explain new refusals honestly

Inspect the existing budget error and caller retry policy once settled spend reaches the ceiling. An application should not retry indefinitely across workers looking for a stale view that still admits the request. The prerelease corrects shared enforcement, not commercial billing or every outage policy. A useful adoption report shows worker identity, settlement evidence, reseeding behavior and documented overshoot limits, with accepted and rejected requests traced to the same customer budget.

## Sources

- [LiteLLM v1.111.0-dev.2 prerelease notes](https://github.com/BerriAI/litellm/releases/tag/v1.111.0-dev.2)
- [LiteLLM implementation and review #51568](https://github.com/BerriAI/litellm/pull/51568)

## Related reading

- [LiteLLM budgets: periods, shared limits and overrun tests](/journal/litellm-budget-reset/)
- [LiteLLM virtual keys: separate access for each application](/journal/litellm-virtual-key-scopes/)
