Merge pull request #44 from gnanam1990/fix/auth-ci-crash

fix: skip Anthropic credential check in CI for 3P providers
This commit is contained in:
Kevin Codex
2026-04-01 22:35:16 +08:00
committed by GitHub

View File

@@ -274,6 +274,7 @@ export function getAnthropicApiKeyWithSource(
} }
if ( if (
!isUsing3PServices() &&
!apiKeyEnv && !apiKeyEnv &&
!process.env.CLAUDE_CODE_OAUTH_TOKEN && !process.env.CLAUDE_CODE_OAUTH_TOKEN &&
!process.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR !process.env.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR
@@ -1729,13 +1730,14 @@ export function getSubscriptionName(): string {
} }
} }
/** Check if using third-party services (Bedrock or Vertex or Foundry or OpenAI-compatible) */ /** Check if using third-party services (Bedrock or Vertex or Foundry or OpenAI-compatible or Gemini) */
export function isUsing3PServices(): boolean { export function isUsing3PServices(): boolean {
return !!( return !!(
isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) || isEnvTruthy(process.env.CLAUDE_CODE_USE_BEDROCK) ||
isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) || isEnvTruthy(process.env.CLAUDE_CODE_USE_VERTEX) ||
isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) || isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) ||
isEnvTruthy(process.env.CLAUDE_CODE_USE_OPENAI) isEnvTruthy(process.env.CLAUDE_CODE_USE_OPENAI) ||
isEnvTruthy(process.env.CLAUDE_CODE_USE_GEMINI)
) )
} }