fix: add CLAUDE_CODE_USE_GEMINI to is3P check in isAnthropicAuthEnabled
CLAUDE_CODE_USE_GEMINI was missing from the is3P check in isAnthropicAuthEnabled(), causing Gemini users to see the Anthropic login screen at startup even with GEMINI_API_KEY set. isAnthropicAuthEnabled() returns true when is3P is false, which triggers the OAuth/login flow. Since CLAUDE_CODE_USE_GEMINI was not included, Gemini was not treated as a 3P provider here, showing the gcloud/Anthropic login prompt unexpectedly. Fix: add CLAUDE_CODE_USE_GEMINI to the is3P check, consistent with how CLAUDE_CODE_USE_OPENAI is handled in the same block. Fixes #43. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -116,7 +116,8 @@ export function isAnthropicAuthEnabled(): boolean {
|
|||||||
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)
|
||||||
|
|
||||||
// Check if user has configured an external API key source
|
// Check if user has configured an external API key source
|
||||||
// This allows externally-provided API keys to work (without requiring proxy configuration)
|
// This allows externally-provided API keys to work (without requiring proxy configuration)
|
||||||
|
|||||||
Reference in New Issue
Block a user