From 6d70abc87134a6f1243b90512530e201f08b02c2 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Fri, 25 Sep 2026 13:05:39 -0500 Subject: [PATCH] fix(desktop): label the Anthropic OAuth/Pro card 'Anthropic Account' The accounts page and onboarding picker labeled the anthropic entry 'Anthropic API Key' even though that flow (hermes auth add anthropic) connects the Claude Pro/Max subscription via OAuth/PKCE. Users with a subscription read the label literally, concluded they needed an API key, and went key-hunting. The entry that actually wants a pasted key is 'claude-code' (claude setup-token), which keeps its own name. Rename the shared PROVIDER_DISPLAY_NAMES entry and the dashboard provider-catalog name to 'Anthropic Account', and update the onboarding test assertions. Fixes #59071 Salvages #59073 (same rename, authored by Kailigithub) Co-authored-by: Kailigithub <12250313+Kailigithub@users.noreply.github.com> --- apps/desktop/src/components/onboarding/index.test.tsx | 6 +++--- apps/desktop/src/lib/model-status-label.ts | 2 +- hermes_cli/web_server_oauth.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/desktop/src/components/onboarding/index.test.tsx b/apps/desktop/src/components/onboarding/index.test.tsx index bbbf3d796a..5753c21d11 100644 --- a/apps/desktop/src/components/onboarding/index.test.tsx +++ b/apps/desktop/src/components/onboarding/index.test.tsx @@ -57,12 +57,12 @@ describe('onboarding Picker', () => { // Fireworks stays behind the disclosure with the other alternatives; only // Nous Portal is visible before the user expands the list. expect(screen.queryByText('Fireworks AI')).toBeNull() - expect(screen.queryByText('Anthropic API Key')).toBeNull() + expect(screen.queryByText('Anthropic Account')).toBeNull() fireEvent.click(screen.getByRole('button', { name: 'Other providers' })) expect(screen.getByText('Fireworks AI')).toBeTruthy() - expect(screen.getByText('Anthropic API Key')).toBeTruthy() + expect(screen.getByText('Anthropic Account')).toBeTruthy() expect(screen.getByRole('button', { name: 'Collapse' })).toBeTruthy() }) @@ -74,7 +74,7 @@ describe('onboarding Picker', () => { render() expect(screen.getByText('Fireworks AI')).toBeTruthy() - expect(screen.getByText('Anthropic API Key')).toBeTruthy() + expect(screen.getByText('Anthropic Account')).toBeTruthy() expect(screen.getByText('ChatGPT or Codex Subscription')).toBeTruthy() expect(screen.queryByText('Other sign-in options')).toBeNull() expect(screen.queryByText('Recommended')).toBeNull() diff --git a/apps/desktop/src/lib/model-status-label.ts b/apps/desktop/src/lib/model-status-label.ts index d9271b7fc0..c2c9b2d06d 100644 --- a/apps/desktop/src/lib/model-status-label.ts +++ b/apps/desktop/src/lib/model-status-label.ts @@ -36,7 +36,7 @@ export function currentPickerSelection( * `xai-oauth` never reads as the plain `xai` key path, and internal route names * never reach user-facing copy. */ export const PROVIDER_DISPLAY_NAMES: Readonly> = { - anthropic: 'Anthropic API Key', + anthropic: 'Anthropic Account', 'claude-code': 'Anthropic OAuth: Required Extra Usage Credits to Use Subscription', 'minimax-oauth': 'MiniMax', nous: 'Nous Portal', diff --git a/hermes_cli/web_server_oauth.py b/hermes_cli/web_server_oauth.py index 6752df1716..e90c5afb98 100644 --- a/hermes_cli/web_server_oauth.py +++ b/hermes_cli/web_server_oauth.py @@ -41,7 +41,7 @@ def _token_status(source: str, source_label: str, creds: Dict[str, Any]) -> Dict def _anthropic_oauth_status() -> Dict[str, Any]: - """Status for the "Anthropic API Key" card: Hermes-managed PKCE file first, then the + """Status for the "Anthropic Account" card: Hermes-managed PKCE file first, then the registry-ordered env vars (process env — where Bitwarden-sourced secrets land — then .env). Claude Code's ``~/.claude/.credentials.json`` is deliberately NOT read here; it has its own @@ -167,7 +167,7 @@ _OAUTH_PROVIDER_CATALOG: tuple[Dict[str, Any], ...] = ( # in-dashboard Connect button would let a scriptable HTTP endpoint mint Claude Pro/Max # subscription tokens outside Anthropic's own client, against its OAuth usage policies. # Login works via the terminal (`hermes auth add anthropic`) or a plain API key. - {"id": "anthropic", "name": "Anthropic API Key", "flow": "external", "cli_command": "hermes auth add anthropic", + {"id": "anthropic", "name": "Anthropic Account", "flow": "external", "cli_command": "hermes auth add anthropic", "docs_url": "https://docs.claude.com/en/api/getting-started", "status_fn": _anthropic_oauth_status}, {"id": "claude-code", "name": "Anthropic OAuth: Required Extra Usage Credits to Use Subscription", "flow": "external", "cli_command": "claude setup-token",