singularity-forge/packages/pi-coding-agent
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
..
scripts fix: handle Windows non-ASCII paths in cpSync with copyFileSync fallback (#1181) 2026-03-18 10:13:37 -06:00
src fix(auth): fall through to env/fallback when OAuth credential has no registered provider (#2097) 2026-03-23 10:03:05 -06:00
package.json release: v2.42.0 2026-03-22 16:30:29 +00:00
pnpm-lock.yaml fix: type errors in claude-import.ts and marketplace-discovery.ts 2026-03-16 14:46:31 -04:00
tsconfig.json feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00