Skip to content

Claude instance routed through a proxy in settings.json shows as "Claude API Key" #26909

Open

Description

@EhsanulHaqueSiam

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_URL and env.ANTHROPIC_AUTH_TOKEN in the profile's settings.json. The claude CLI applies that env over the process environment. The live CLI reports tokenSource: "ANTHROPIC_AUTH_TOKEN", apiProvider: "firstParty" and rate_limits_available: false.
  • checkClaudeProviderStatus looks for ANTHROPIC_BASE_URL only 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, and ANTHROPIC_AUTH_TOKEN maps 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 Show CLIProxyAPI hub limits for Claude instances that route through the hub #26938.
  • An earlier version of this issue blamed a setup-token wrapper. That was wrong: the settings.json env overrides the token.

Steps to reproduce

  1. 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.
  2. Use that profile for a Claude provider instance in T3.
  3. 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

# live CLI account fields (SDK initialization)
{"tokenSource":"ANTHROPIC_AUTH_TOKEN","apiProvider":"firstParty"}  usage: {"rate_limits_available":false}
# cached provider snapshot (trimmed)
"auth": { "status": "authenticated", "type": "apiKey", "label": "Claude API Key" }
"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

Activity

  1. changed the title [-]Thread details card ignores CLIProxyAPI usage sources[/-] [+]Claude instance routed through a proxy in settings.json shows as "Claude API Key"[/+] on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions