Repository navigation
fix(server): Claude API-key logins show as Claude API Key in provider status - #29855
Conversation
… status Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Claude API-key logins now display “Claude API Key” in provider status. The change preserves authentication decisions and endpoint-specific labels, with no material operational or access impact. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Review requested
Logged so this PR shows when a maintainer was asked to review it. |
…and label Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dismissing prior approval to re-evaluate a160dab
EvidenceRan the same scenario on fresh databases with a dummy ANTHROPIC_API_KEY, an empty Claude config directory, and no inherited proxy credentials. Paired the web client, opened Settings → Providers, enabled and selected Claude, then captured its authentication status. Chromium, 1280×800, light theme on both sides.
scenarios:prove exited 0: failsOnBase=true, passesOnHead=true. Both the provider list entry and Status row show the difference. Not shown:
|
… status (pingdotgg#29855) Co-authored-by: Julius Marminge <julius0216@outlook.com> (cherry picked from commit 1fcb245)


Problem
A Claude instance that signs in with an API key (
ANTHROPIC_API_KEY, anapiKeyHelper, or a Console/loginmanaged key) shows a bare "Authenticated" in Settings → Providers, with no auth method. Codex shows "Authenticated · OpenAI API Key" in the same situation, and Claude shows "Claude API Key" when the key comes throughANTHROPIC_AUTH_TOKEN.The Claude SDK reports these logins as
tokenSource: "none"andapiKeySource: "ANTHROPIC_API_KEY"(orapiKeyHelper,/login managed key). The status probe already counts a non-noneapiKeySourceas signed in (claudeAuthStatus), butclaudeAuthMetadataonly readstokenSource, so the snapshot gets no authtypeorlabel.Change
claudeAuthMetadatanow also returns theClaude API Keylabel whenapiKeySourceis set and notnone. It uses the same checkclaudeAuthStatususes forhasApiKey. The Bedrock and custom-endpoint labels are checked first, as before, so they still win.Scope and approval
Very small, focused fix for an obvious bug, so no prior issue: the probe already decides these installs are signed in with an API key, but drops the label. The SDK typings describe
apiKeySourceas "where the credential used for API requests came from". The fix touches one server function and adds one assertion to an existing test.Overlap search: the closest open PRs are #25580 (usage limits behind a custom endpoint) and #29408 / #29713 (Claude home and keychain selection). None of them changes how the auth label is chosen.
Verification
main: the extended casekeeps an API key install authenticated when it reports no token sourceinapps/server/src/provider/ProviderRegistry.test.tsfailed withAssertionError: expected undefined to equal 'Claude API Key'.vp test run src/provider/ProviderRegistry.test.tspasses 52/52 (also after rebasing on currentmain).vp run check:changedpasses: format, lint, knip, typecheck (3 packages), tests 53/53.apiKeySourcevalues.Reviewed with sol-loop: 1 round with GPT-6.1 Sol on high. Sol verdict: approved.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code