﻿# LiteLLM separates a borrower’s total cap from its share during saturation

Test idle borrowing followed by saturation, preserving both the all-window cap and the fresh saturated share; neither counter can substitute for the other.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-agent-litellm-borrow-cap-versus-saturation-share/
Language: en

The November 13 LiteLLM v1.111.0-dev.2 prerelease separates a capped team’s all-window borrowing counter from its saturation-only share counter. Idle usage should still count toward the cap without consuming the newly relevant saturated share. This is a two-counter policy boundary, so evaluating one steady load phase cannot establish the transition behavior the release corrects.

## Use two phases with known token amounts

Let one synthetic team use a known amount while the model is idle, then introduce other teams to cross the saturation threshold. Continue the original team’s requests with fixed per-call usage. Compare its remaining cap and available saturated share independently. The fixture should expose a team that has room under its total ceiling but would be wrongly blocked if idle usage had already consumed the saturated counter.

## The total cap still bounds the whole window

Add a second team near its borrowing cap before saturation begins. Assert the new share does not let it exceed that all-window ceiling. A repair that merely resets usage at saturation would improve one scenario while weakening the cap. Keep the expected arithmetic outside the gateway and record which limiter reason rejects each request. Different rejection categories explain which constraint is binding at a particular point.

## Reservations must follow failures and fallback

Exercise a harmless provider failure and a permitted model fallback while tracking reservations for both counters. A reservation belongs to its own window and scope. Returning one counter while retaining the other can distort admission even when total logged usage looks correct later. Use distinguishable model groups and stable request identities so a moved attempt cannot accidentally charge the old group’s share or release another request’s cap reservation.

## Metrics should describe the actual constraint

Inspect configured share, cap-related usage and borrowing gauges alongside the rejection reason. A dashboard line cannot establish which counter governed admission. The prerelease corrects accounting separation and transition behavior, not a universal optimal borrowing multiplier. A useful adoption record shows the two phases, known amounts, reservation outcomes and preserved cap, allowing operators to choose policy from their workload rather than from a single attractive throughput number.

## 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 #51494](https://github.com/BerriAI/litellm/pull/51494)

## Related reading

- [LiteLLM budgets: periods, shared limits and overrun tests](/journal/litellm-budget-reset/)
- [LiteLLM Proxy: when to operate your own model gateway](/journal/litellm-proxy-guide/)
