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> |
||
|---|---|---|
| .. | ||
| scripts | ||
| src | ||
| package.json | ||
| pnpm-lock.yaml | ||
| tsconfig.json | ||