---
title: "Budget reservation"
url: "/docs/proxy/budget_reservation"
canonical_url: "https://docs.litellm.ai/docs/proxy/budget_reservation"
type: "docs"
last_updated: "2026-12-02"
summary: "LiteLLM holds each request's estimated cost against its budgets before calling the provider, so concurrent requests cannot overshoot a budget together."
related:
  - "/docs/proxy/temporary_budget_increase"
  - "/docs/proxy/fail_closed_budgets"
---
# Budget reservation

> Index of all LiteLLM docs: https://docs.litellm.ai/llms.txt


Available in LiteLLM v1.85.0 and later.

A budget check compares recorded spend with the cap, but a request's cost is only recorded once it finishes. Without anything else, a burst of concurrent requests could all pass a budget that only some of them fit. Budget reservation closes that gap. Before LiteLLM calls the provider, it estimates the most the request can cost and adds that estimate to the spend counter of every budget the request falls under. This hold is the reservation, and it lets the next request see the room this one may use. Once the response is priced, the hold is replaced with the actual cost.

Reservation is on by default and needs no setting. `general_settings.disable_budget_reservation: true` (since LiteLLM v1.90.0) turns it off for every budget at once.

## How it works {#how-it-works}

```mermaid
sequenceDiagram
  accTitle: A request's estimated cost held against its budgets
  accDescr: The client sends a request. LiteLLM estimates the most it can cost and adds that estimate to the spend counter of each budget it falls under. If a budget has no room left, LiteLLM returns budget_exceeded without calling the provider. Otherwise it calls the provider, prices the response, replaces the estimate on each counter with the actual cost, and returns the response.
  participant C as Client
  participant L as LiteLLM
  participant S as Spend counters
  participant P as Provider
  C->>L: Request
  L->>L: Estimate the most it can cost
  L->>S: Add the estimate to each budget
  alt A budget has no room left
    L-->>C: budget_exceeded, provider not called
  else Reserved
    L->>P: Call the provider
    P-->>L: Response
    L->>S: Replace the estimate with the actual cost
    L-->>C: Response
  end
```

The estimate prices the request's input tokens plus its output cap. The output cap is the largest of `max_tokens`, `max_completion_tokens`, `max_output_tokens` and the provider's own fields such as `generationConfig.maxOutputTokens`, held to the model's output limit, or to 16,384 when the model lists none. A request that sets no cap is estimated at 16,384 output tokens, or the model's output limit when that is lower. Output is priced at the model's output rate and multiplied by `n` when the request asks for several outputs. When LiteLLM cannot count the input, it uses the model's input limit. Reservation runs before routing, so for a model group whose deployments have different prices, LiteLLM holds the cost of the most expensive one. Embeddings, rerank and moderation requests are estimated on input alone.

Every request ends by settling its hold. A successful request settles at its actual cost and a failed one at zero. A request that the client cancels after the provider call started settles at the cost of its input tokens, since the provider bills those either way. LiteLLM keeps the hold alive while a long request is still running.

When a budget has no room left because concurrent requests already reserved it, the request is refused with the regular [`budget_exceeded` error](./budget_exceeded_errors.md), whose message names the scope by type and ID, such as `Budget has been exceeded! Team=team-research Current cost: 10.2, Max budget: 10.0`. When some room is left but less than the estimate, LiteLLM admits the request and cuts its hold down to what remains, so that last request can land a little over the cap. With [fail-closed enforcement](./fail_closed_budgets.md) on, the same request is refused up front instead, with `Estimated request cost` added to the message.

## When to use it

Leave reservation on for any budget that has to hold under load, such as an agent that fans out parallel calls, a script with many workers sharing one key, or a team with a small budget and many members. It needs no setup.

Turn it off only as a short-term fix when holds that were never settled keep refusing requests after those requests have finished, and turn it back on once that is resolved. Without reservation a budget can be overshot by whatever is in flight when it runs out. To keep a budget a hard ceiling even while Redis is degraded, keep reservation on and add [fail-closed budget enforcement](./fail_closed_budgets.md). To cap throughput rather than spend, use [rate limits](./rate_limits.md).

## Supported scopes

Reservation is on for every supported scope by default, and `general_settings.disable_budget_reservation: true` turns it off for all of them.

| Scope | Supported | How to set it |
| --- | --- | --- |
| Whole proxy | No | `litellm_settings.max_budget` is checked against recorded spend only. |
| Organization | Yes | Holds against the organization's `max_budget`. |
| Team | Yes | Holds against the team's `max_budget` and each of its `budget_limits` windows. |
| Team member | Yes | Holds against the member's budget in the team, from `max_budget_in_team` or the team's `team_member_budget`. |
| Project | Yes | Holds against the project's `max_budget`. |
| Virtual key | Yes | Holds against the key's `max_budget`, or its shared budget row's, and each of its `budget_limits` windows. |
| Internal user | Yes | Holds against the personal `max_budget` and each `budget_limits` window, on requests the personal budget covers. |
| Customer | Yes | Holds against legacy end-user budgets and Customer Management `budget_limits` windows. A Customer Management `max_budget` is checked against recorded spend only. |
| Tag | Yes | Tags created with `/tag/new`. Tags in `litellm_settings.tag_budget_config` are enforced by the router without a hold. |
| Model access group | Yes | Holds against the group's `max_budget`. |
| AI tool | No | Checked against the AI tool budget row only, so concurrent requests can overshoot. |
| Agent session | No | Session spend is checked against its own counter before each call. |

## How to use it

### Keep the estimate close to real cost

Set `max_tokens`, or the route's equivalent, on requests from callers that run close to a cap. A request without one is held at up to 16,384 output tokens, which on an expensive model can be more than the room left in a small budget. With fail-closed enforcement that request is refused even when its real cost would have fit.

### Disable budget reservation {#disable-budget-reservation}

Disable reservation only as a temporary mitigation if holds that were never settled cause unexpected `budget_exceeded` responses after the affected requests have completed:

```yaml title="config.yaml"
general_settings:
  disable_budget_reservation: true
```

:::warning

Disabling reservation can allow concurrent requests to exceed a configured budget because each request is evaluated only against spend already recorded.

:::

Requests are still rejected once a budget is already spent. LiteLLM logs once at startup that budget enforcement is read-time only while the setting is on.

If a budget must remain a hard ceiling when Redis is unavailable or contains stale data, keep reservation enabled and also configure [`fail_closed_budget_enforcement`](./fail_closed_budgets.md).

### Batch requests {#batch-requests}

Budget reservation cannot estimate the full cost of a batch job. A `POST /batches` request contains an `input_file_id` rather than the prompts in the file, so LiteLLM cannot price the complete workload at submission. The submission reservation is released after the submission response, and LiteLLM records the final cost when the batch completes.

Use [batch rate limiting](../batches.md#how-rate-limiting-for-batches-api-works) to control batch throughput, and monitor completed batch costs for budget reporting.

## Limits

Routes that the model's pricing cannot estimate, such as image generation priced per image and some audio routes, get no hold and are checked against recorded spend only. [Per-model budgets](./per_model_budgets.md) get no hold either, and requests to [free models](./free_model_budgets.md) take none because they skip budget checks altogether.

Holds live in the same spend counters that every worker shares through Redis. Without Redis each worker keeps its own counters, so requests on different workers do not see each other's holds. When a hold cannot be written, for example while Redis is down, LiteLLM skips it and checks the request against recorded spend, unless fail-closed enforcement is on, which returns a 503 instead.

A key with `throttle_on_budget_exceeded: true` drops the hold on its own budget when the hold would take it over the cap, so it keeps serving at the throttled rate. See [Throttle over-budget keys](./budget_throttling.md).

## Related

See [Fail-closed budget enforcement](./fail_closed_budgets.md) to make holds strict, [Budget exceeded errors](./budget_exceeded_errors.md) for what a refused request receives, and [Budgets and spend limits](./budgets.md) for every scope a request is checked against.

## Related pages

- [Temporary budget increase](https://docs.litellm.ai/docs/proxy/temporary_budget_increase.md)
- [Fail-closed budget enforcement](https://docs.litellm.ai/docs/proxy/fail_closed_budgets.md)
