Merge pull request #151 from auriti/fix/gemini-auth-dummy-key-bypass

fix: prevent ANTHROPIC_API_KEY from interfering with Gemini provider auth
This commit is contained in:
Kevin Codex
2026-04-02 21:43:04 +08:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -812,7 +812,8 @@ export function getAssistantMessageFromError(
if (
error instanceof Error &&
error.message.toLowerCase().includes('x-api-key')
error.message.toLowerCase().includes('x-api-key') &&
getAPIProvider() === 'firstParty'
) {
// In CCR mode, auth is via JWTs - this is likely a transient network issue
if (isCCRMode()) {