singularity-forge/packages
Jeremy b5e1beff8e fix(auth): self-heal stale Anthropic OAuth credential (#4399)
Anthropic OAuth was removed in v2.74.0 for TOS compliance (#3952). Users
who upgraded through that version still have type:"oauth" entries under
`anthropic` in auth.json which cannot resolve to a valid API key.

stale entry, so hasAuth("anthropic") kept reporting true and masked the
claude-code fallback path. Users had to hand-edit auth.json to recover.

Self-heal instead:

- AuthStorage.removeLegacyOAuthCredential(provider) strips only
  type:"oauth" entries and preserves any api_key credentials.
- sdk.ts getApiKey() calls it when the legacy-OAuth branch triggers,
  logs a one-line warning, and throws a message pointing the user at
  the "claude-code" provider when the `claude` binary is in PATH, or
  at ANTHROPIC_API_KEY otherwise.

Closes #4399

(cherry picked from commit b8ef6604617fda239a037cf5d5e6020b168d2e62)
2026-04-18 13:40:02 +02:00
..
daemon release: v2.75.0 2026-04-17 17:26:59 +00:00
mcp-server release: v2.75.0 2026-04-17 17:26:59 +00:00
native release: v2.75.0 2026-04-17 17:26:59 +00:00
pi-agent-core release: v2.75.0 2026-04-17 17:26:59 +00:00
pi-ai fix(pi-ai): wire thinking:{type} field and extend adaptive-thinking model coverage (#4392) 2026-04-18 13:38:30 +02:00
pi-coding-agent fix(auth): self-heal stale Anthropic OAuth credential (#4399) 2026-04-18 13:40:02 +02:00
pi-tui release: v2.75.0 2026-04-17 17:26:59 +00:00
rpc-client release: v2.75.0 2026-04-17 17:26:59 +00:00