singularity-forge/packages
Tom Boucher 297845f10c fix(auth): fall through to env/fallback when OAuth credential has no registered provider (#2097)
Fixes #2083

When an OpenRouter API key is stored in auth.json as type:"oauth" (instead
of type:"api_key"), getApiKey() calls getOAuthProvider("openrouter") which
returns undefined — OpenRouter is not a registered OAuth provider. Previously,
resolveCredentialApiKey returned undefined and getApiKey returned that directly,
never reaching the env-var or fallback-resolver paths.

Now, when resolveCredentialApiKey returns undefined, getApiKey falls through
to OPENROUTER_API_KEY env var and the fallback resolver instead of silently
failing with "Authentication failed."

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 10:03:05 -06:00
..
native feat(gsd): unified rule registry, event journal, journal query tool, and tool naming convention (#1928) 2026-03-21 18:47:41 -06:00
pi-agent-core fix(footer): display active inference model during execution (#1982) 2026-03-22 17:06:49 -06:00
pi-ai fix(pi-ai): correct Copilot context window and output token limits (#2118) 2026-03-22 17:04:16 -06:00
pi-coding-agent fix(auth): fall through to env/fallback when OAuth credential has no registered provider (#2097) 2026-03-23 10:03:05 -06:00
pi-tui fix(tui): prevent freeze when using @ file finder (#1832) 2026-03-21 12:55:12 -06:00