Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions pages/docs/configuration/token_usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,32 @@ balance:

Check out the [Balance Configuration](/docs/configuration/librechat_yaml/object_structure/balance) page for more details.

## Per `modelSpecs` Balance

In addition to the global balance settings, you can also configure token credit limits on a per-model-spec basis using the `modelSpecs` object in your `librechat.yaml` file. This allows for more granular control over token usage for specific models.

```yaml filename="librechat.yaml"
version: 1.2.8

modelSpecs:
list:
- name: "my-nice-model-spec"
label: "My Nice Model Spec"
description: "Most beautiful model spec ever"
group: "My Models"
balance: {
enabled: true # <===============
startBalance: 10000
autoRefillEnabled: false
refillIntervalValue: 1
refillIntervalUnit: 'days'
refillAmount: 100
},
preset:
endpoint: "azureOpenAI"
model: "gpt-4.1"
```

## How Auto-Refill Works

When a user's balance is tracked and **autoRefill** is enabled, the system will automatically add credits to the balance only when the specified time interval has passed since the last refill. This is achieved by comparing the current date with the `lastRefill` date plus the specified interval.
Expand Down