fix: add CLAUDE_CODE_USE_GEMINI to is3P check to prevent login screen - #56
Merged
kevincodex1 merged 1 commit intoApr 1, 2026
Merged
Conversation
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 Gitlawb#43. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Closed
kevincodex1
approved these changes
Apr 1, 2026
euxaristia
pushed a commit
to euxaristia/openclaude
that referenced
this pull request
Apr 13, 2026
…screen fix: add CLAUDE_CODE_USE_GEMINI to is3P check to prevent login screen
reymaster
pushed a commit
to reymaster/openclaude
that referenced
this pull request
May 5, 2026
…screen fix: add CLAUDE_CODE_USE_GEMINI to is3P check to prevent login screen
thedeveloloper
pushed a commit
to thedeveloloper/openclaude
that referenced
this pull request
Jun 8, 2026
…screen fix: add CLAUDE_CODE_USE_GEMINI to is3P check to prevent login screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Gemini users see the Anthropic/gcloud login screen at startup even when
CLAUDE_CODE_USE_GEMINI=1andGEMINI_API_KEYare correctly set. Reported in #43.Root Cause
isAnthropicAuthEnabled()insrc/utils/auth.tsuses anis3Pcheck to decide whether to skip Anthropic auth.CLAUDE_CODE_USE_OPENAIwas included butCLAUDE_CODE_USE_GEMINIwas missing:With
is3P = false,shouldDisableAuth = false, soisAnthropicAuthEnabled()returnstrue→ login screen appears.Fix
One line — add
CLAUDE_CODE_USE_GEMINIto theis3Pcheck, consistent withCLAUDE_CODE_USE_OPENAI.Test
Closes #43.