[Bug]: Hub-routed Claude accounts never show limit reset credits (usage call lacks cedar_ember=1 and uses an old Claude Code UA)
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Run CLIProxyAPI (tested on v8.0.66, the latest release) with several Claude OAuth accounts that have free limit resets (claude.ai → Settings → Usage shows "Limit resets: 2 available" — a Full reset and a Fable reset).
- In T3 Code add the hub as a usage-limit source (Settings → Providers → Add hub, management key).
- Open Usage → Limits (or the composer usage popover).
Expected behavior
Hub-routed Claude accounts show their reset credits, the same way directly connected Claude instances and hub-routed Codex accounts do.
Actual behavior
No reset credits are shown for any hub-routed Claude account. Session/weekly windows render normally.
Cause (main @ 40c36825, same code in 0.1.9-nightly.20261111.4501):
apps/server/src/usage/cliproxyApi.ts:306-312— theclaudeentry ofHUB_PROVIDERScallshttps://api.anthropic.com/api/oauth/usagewithout?cedar_ember=1and withUser-Agent: claude-code/2.1.273. TheClaudeUsageschema has nocedar_ember, and the returnedusageLimitsnever setsresetCredits(only the Codex entry builds them, lines ~275-287).- The direct path,
apps/server/src/provider/claudeResetCredits.ts:204-221, does it correctly:cedar_ember=1&skip_spend=1+user-agent: claude-cli/${version} (external, cli), thenclaudeResetCreditsToContract(body.cedar_ember, …).
Verified through the hub's POST /v0/management/api-call (which forwards url, query and headers unchanged) for 5 Claude accounts:
| Request | cedar_ember |
|---|---|
/api/oauth/usage (what T3 sends now) |
null |
/api/oauth/usage?cedar_ember=1 + UA claude-code/2.1.273 |
eligible: false, no grants |
/api/oauth/usage?cedar_ember=1 + UA claude-cli/2.1.321 (external, cli) |
eligible: true, 2 grants per account |
So both the missing query param and the old UA have to change. The web side already renders hub resetCredits generically (packages/shared/src/usageLimits.ts builds resetCreditInput from resetCredits.nextCreditId), so this is server-only.
Related gap: consume in cliproxyApi.ts (~line 513) only handles codex accounts, so redeeming a Claude reset through the hub would fail even once credits are shown.
Suggested minimal fix: send ?cedar_ember=1 with a current claude-cli/<version> (external, cli) UA in the hub Claude reader, add cedar_ember to ClaudeUsage, and merge claudeResetCreditsToContract(usage.cedar_ember, now) into usageLimits (without skip_spend, since this call also reads spend).
Impact
Minor bug or occasional failure
Version or commit
0.1.9-nightly.20261111.4501 (c90b67859a6d); main @ 40c36825
Environment
Windows 11, T3 Code Nightly desktop, CLIProxyAPI v8.0.66, Claude Code 2.1.321, Claude Team accounts
Logs or stack traces
No error is logged; the reset block is simply never requested.
Workaround
None through the hub. Accounts connected directly as Claude instances (own claude.ai login) show resets.
Still reproduces on 0.1.10 (macOS, desktop) with CLIProxyAPI routing two Claude Max OAuth accounts.
Re-checked through the hub's api-call today with Claude Code's current UA:
| Request | cedar_ember |
|---|---|
/api/oauth/usage + UA claude-code/2.1.273 (what T3 sends) |
null |
/api/oauth/usage?cedar_ember=1&skip_spend=1 + UA claude-code/2.1.273 |
eligible: false, ineligible_reason: "surface", no grants |
same + UA claude-cli/2.1.326 (external, cli) |
eligible: true, grant full-reset-2611 (resets_left: 1, usable_now: true) |
claude.ai → Settings → Usage shows the same "Full reset" as available, but the hub-routed account in Usage → Limits shows no reset badge, unlike the hub-routed Codex account right beside it.