Models and token budgets
The gateway holds the provider keys, allows only the models a policy names and stops calls once the day’s token budget is spent.
spec: models: allow: ["claude-sonnet-*", "gpt-4.1-mini"] dailyTokenBudget: 2000000How budgets count
Input plus output tokens, per policy, per UTC day, metered from each response,
including streamed ones. Once the budget is spent, model calls get 429 until
midnight UTC, so agents are paused, not killed. status.usage and
kubectl leash status show today’s count:
$ kubectl leash status -n agentsNAME PHASE BACKEND TOKENS TODAY AGENTS APPROVALS NOTESclaude-agent Enforced cilium 1.6M / 2M (82%) 3 -Budgets are soft
A call in flight when the budget runs out still finishes. With several gateway
replicas, a budget can be overshot by roughly what the other replicas spend in
one flush interval (gateway.usageFlushInterval, 15s by default).
Providers
Provider URLs and how their keys are sent are in the gateway’s registry
(gateway.config in the chart). The keys themselves come from the gateway’s
credentials Secret. Details in The gateway.