Usage & metering¶
What is counted against your account today, what the caps are, and — just as important —
what is not counted. Everything here was measured on 2026-09-04 from the running cluster
(the LiteLLM ConfigMap, the pod environment, the Redis store) and from the repository files
that deploy it; tests/test_goal_20260904.py fails if the numbers on this page stop matching
k8s/litellm/deployment.yaml.
What is metered¶
Every model call that passes through the LiteLLM gateway — all presets and routes with
route: litellm in models.yaml, which is nearly everything in the model picker — is priced
from LiteLLM's per-token price table and added to your calendar month total by
k8s/litellm/budget_tracker.py, a gateway callback that keeps one Redis key per user and
month (budget:mo:YYYY-MM:<user-id>).
| Per-user cap | one subscription allowance per calendar month (UTC); it resets on the 1st. Its size is an operator setting (see Where this is defined); you see your position as a fraction, never a dollar figure |
| Admin accounts | a larger allowance (operator setting) |
| Max accounts | an operator-assigned, time-limited tier at 20× the standard allowance (k8s/litellm/budget_tiers.json; a tier never lowers an admin's allowance). Ask the assistant for your usage and it reports against the cap that actually applies to you |
| At the cap | the next request is refused with HTTP 429 — "You have used all of your subscription allowance for this month; requests are refused until it resets on the 1st of the month (UTC)." — until the month rolls over |
| Attribution | the user id Open WebUI injects server-side (X-OpenWebUI-User-* headers); chat and API-key calls count for the same account, and a sub-agent delegation counts under the user who delegated |
| Failure mode | fail-open: if Redis is unreachable or the request carries no identity, it goes through unmetered rather than blocked — budgeting is a guardrail, not a gate |
Measured 2026-09-04
budget_tracker.proxy_handler_instance is in the live ConfigMap's callbacks; the
litellm-proxy pods carry MONTHLY_USER_BUDGET=10.0 and MONTHLY_ADMIN_BUDGET=1000.0;
LiteLLM is deployed only by scripts/deploy_litellm.sh (ConfigMap + rollout restart); merges under k8s/litellm/ do not trigger the platform deploy pipeline (#584).
Redis holds 11 budget:mo:* keys across 2026-08 and 2026-09 — the tracker is on and
accruing. Source: k8s/litellm/budget_tracker.py, k8s/litellm/deployment.yaml,
k8s/litellm/config.yaml.
Which price is used¶
The upstream model's entry in LiteLLM's built-in price map (input + output tokens; images
count as their token equivalent). A route whose upstream id the price map does not know bills
$0 — the aliases in k8s/litellm/config.yaml exist so that priced ids are used for the
cloud models. Local models (Ollama on the fleet, vLLM on MIT Engaging) have no price entry and
bill $0 today. (Measured: config comments and the callback's use of response_cost; not
re-measured per model.)
A second budget that is not enforced¶
k8s/litellm/custom_auth.py also stamps a max_budget (its DEFAULT_USER_BUDGET / DEFAULT_ADMIN_BUDGET defaults,
DEFAULT_*_BUDGET) on every virtual key. LiteLLM would enforce that figure only with its own
database, which this deployment does not run (config.yaml: database_url is off — the Prisma
query engine is missing from the image). That number never blocks anything; the Redis tracker
above is the enforcement.
What you can see¶
See your own usage¶
Ask the assistant "how much have I used this month?" (or "how much of my subscription allowance is left?",
"how close am I to the cap?") in a chat whose model has the usage_tools tool enabled. The
tool reads your month key — budget:mo:YYYY-MM:<your-user-id> — from the same Redis the
tracker writes, and answers in one sentence:
You have used 34% of your subscription allowance for 2026-09; 66% remains. It resets on the 1st of the month (UTC).
At 80% of the allowance the reply adds a warning; when it is used up it says so and explains the 429.
It is read-only and takes no arguments: the user is always the signed-in person in the chat
(Open WebUI's server-injected __user__), so nobody can look up anyone else's spend. Admins
are measured against the admin cap. Two failure replies, both fail-open like the tracker itself
(a lookup never blocks a request): if Redis does not answer — connection refused, a DNS stall, a
timeout — the reply is "Usage lookup is unavailable right now … try again in a minute"; if the
tool itself is misconfigured or broken (a bad Redis URL valve, an unexpected error) it is "Usage
lookup is misconfigured or broken (…); please tell an administrator", with the traceback in the
pod log, never in the chat. A key whose stored value is not a number is reported as "cannot be
determined" naming the key — never as $0.00.
Source: usage_tools.py (Open WebUI adapter) over usage_core.py (headless core; the same
key/formatting logic is importable without Open WebUI), bundled into one file by
scripts/bundle_tool.py; tests/unit/test_usage_tools.py pins the key format to the
tracker's and the caps to the Deployment.
(Status 2026-09-04: in the repository, pending registration as a tool in Open WebUI — #525. Until then you learn your position at the 429, or by asking an administrator, who can read your month key in Redis.)
What there is not¶
No usage page: Open WebUI has none, and LiteLLM's spend UI needs the database that is switched off. The tool above is the self-service surface.
Not metered¶
- Presets served by a direct Open WebUI connection, which bypass the gateway and its
budget:
dirk-assistant(Anthropic direct),robot-armand the other VVUQ specialist models on the quick-tunnel connections, and any model that reaches Open WebUI through a direct connection rather than LiteLLM. (Measured 2026-09-04: seven OpenAI-compatible connections are configured; only the first is the gateway — the others areapi.anthropic.com, twotrycloudflarequick tunnels, andbridge-mini/glimmer/inklingonkratuvak.com.) When the same id is served by both a direct connection and a gateway alias (glimmer, until the gateway alias is deployed), Open WebUI uses the first connection that lists it. - Tool-server work: VVUQ Lean compilation, femwell mode solves, GitHub MCP calls, marimo cell execution — their compute is not priced.
- Notebook pods, Knowledge/RAG embedding and retrieval, web search and fetch.
- Sub-agent orchestration overhead beyond the model tokens themselves.
Where this is defined¶
vocabulary.py (the term users see — subscription allowance) · k8s/litellm/budget_tracker.py (mechanism) · k8s/litellm/deployment.yaml (MONTHLY_* caps, the operator-facing dollar size) ·
k8s/litellm/config.yaml (callbacks, max_parallel_requests) · models.yaml (route: per
preset) · tests/test_goal_20260904.py (pins this page to the deployed values).