Claude instance routed through a proxy in settings.json shows as "Claude API Key"#26909
What happened
On a Claude thread, the Labs "Usage in thread details" card shows Limits: Unavailable, and the provider shows as "Claude API Key". The user asked why, and how to get limits from their CLIProxyAPI hub.
Diagnosis
- The Claude profile routes through a CLIProxyAPI hub the way the hub guide describes:
env.ANTHROPIC_BASE_URLandenv.ANTHROPIC_AUTH_TOKENin the profile'ssettings.json. The claude CLI applies thatenvover the process environment. The live CLI reportstokenSource: "ANTHROPIC_AUTH_TOKEN",apiProvider: "firstParty"andrate_limits_available: false. checkClaudeProviderStatuslooks forANTHROPIC_BASE_URLonly in T3's own environment (apps/server/src/provider/ClaudeProvider.ts:605), so it never detects the proxy. It labels the instance from the token source instead, andANTHROPIC_AUTH_TOKENmaps to "Claude API Key".- Limits are "unsupported" because the CLI reads no plan limits through a proxy. The hub's usage source has them, but the thread card reads only the instance's own limits (
ThreadDetailsUsage.tsx:54-58). Using the hub there is a feature, proposed in #26938. - An earlier version of this issue blamed a setup-token wrapper. That was wrong: the
settings.jsonenv overrides the token.
Steps to reproduce
- Point a Claude profile at a proxy in its settings:
{"env": {"ANTHROPIC_BASE_URL": "https://<hub>:8317", "ANTHROPIC_AUTH_TOKEN": "<key>"}}in~/.claude/settings.json. - Use that profile for a Claude provider instance in T3.
- The instance shows as "Claude API Key" instead of "Custom API endpoint".
Version
0.1.5-nightly.20261029.3867 (server; T3 Code Desktop 0.1.5-nightly.20261029.3867 on Linux connected to it). Still present on main.
Environment
Server: macOS 27.0 arm64, Node 26.12.1, claude CLI 2.1.312, self-hosted CLIProxyAPI over Tailscale HTTPS. Client: T3 Code Desktop on Linux.
Evidence
shell
| 1 | # live CLI account fields (SDK initialization) |
| 2 | {"tokenSource":"ANTHROPIC_AUTH_TOKEN","apiProvider":"firstParty"} usage: {"rate_limits_available":false} |
| 3 | # cached provider snapshot (trimmed) |
| 4 | "auth": { "status": "authenticated", "type": "apiKey", "label": "Claude API Key" } |
| 5 | "usageLimits": { "windows": [], "unavailable": { "reason": "unsupported" } } |
Related issues
Not #24114, which covers setup-token sessions; here the settings.json proxy overrides the token. Fix: #26937.
Fix applied or workaround
Nothing changed on the machine. /usage-limits in the composer shows the hub's numbers.
Filed by
t3 triage agent session