Files
t3code/docs/user/usage.md
T
19d8ab2ae9 feat(usage): show Codex and Claude subscription limits on a Limits tab (#9507)
Users on Codex or Claude Code subscriptions could not see how much quota was left or when it resets without leaving T3 Code. A user whose CLIs route through a CLIProxyAPI hub could not see it at all.

Each driver now returns `usageLimits` on its own snapshot (Codex from `account/rateLimits/read`, Claude from the SDK's `get_usage`), adapters normalise turn-driven rate-limit events at the boundary, and a driver-blind ingestion layer folds them onto the owning instance. The Usage page gains a Limits tab (mobile a card) with a bar per window, elapsed marker, pace, and reset countdown. CLIProxyAPI hubs can be added as read-only usage-limit sources; their accounts show badged "via CLIProxyAPI" with emails blurred.

Distilled from #1732 (server model, provider rows) and #9421 (Limits tab, window bars, pace maths). Closes #228.

Co-authored-by: Aditya Mer <[email protected]>
Co-authored-by: Wout Stiens <[email protected]>
Co-authored-by: Claude Code <[email protected]>
2026-09-03 17:47:54 -07:00

2.1 KiB

Review usage

The Usage page combines Codex, Claude Code, and Grok Build activity from your connected environments. It reads the providers' local session history and shows API-equivalent token cost, processed tokens, cache savings, provider shares, and model breakdowns. Subscription billing is separate from the raw token cost shown here.

Grok Build totals come from persisted session updates. Interactive turns that never wrote a completed-turn record will not appear.

The Limits view shows how much of each subscription window you have used on Codex and Claude Code, per connected environment: the session and weekly windows, plus a per-model weekly window such as Fable when your plan has one. Each window is a bar from the moment it opened to its reset, filled by the share of quota spent; a thin line marks how far into the window you are, which is also where even spending would have put the fill, and the icon beside the label says whether you are ahead of, on, or under that pace. Hover a bar for the exact reset time. Limits refresh on the provider health-check interval and update live while a turn runs. API-key accounts have no subscription windows and say so; that includes a Claude Code that reaches Anthropic through a proxy via ANTHROPIC_AUTH_TOKEN, since the CLI then treats itself as an API-key client.

If you pool accounts behind a CLIProxyAPI hub, Add CLIProxyAPI hub on the Limits view shows every account the hub manages, each marked via CLIProxyAPI so it is not mistaken for the provider signed in on this machine. Enter the hub's URL and management key; the key is stored on the server and never sent back to a client. Emails are blurred until clicked, as in provider settings.

Use Past 24h for an hourly chart covering the exact rolling 24-hour period. The 7 days, 30 days, and 90 days ranges use daily resolution. Cost and token toggles update both the headline and chart. Refreshing rescans every connected environment and refetches model pricing on each of them, so a newly released model that showed $0.00 gets a price without waiting for the daily pricing update.