You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gemini CLI v0.24.0-nightly fails to authenticate using BOTH documented authentication methods (OAuth and Vertex AI) when attempting to use a Gemini Code Assist Standard subscription.
Authentication Method 1: OAuth ("Login with Google") - FAILED
Selected "1. Login with Google" during Gemini CLI startup
gemini-2.5-flash - 98.3% (Resets in 23h)
gemini-2.5-pro - 0.0% (Resets in 1h 48m)
Usage limits span all sessions and reset daily.
/auth to upgrade or switch to API key.
These are FREE TIER limits, not Code Assist Standard limits (which should be 1,500 req/day)
Issue: OAuth authentication does not recognize or apply the Code Assist subscription quota
Method 2: Vertex AI Service Account Authentication Attempt
Authentication Configuration:
Gemini CLI settings show: "selectedType": "vertex-ai" (verified in ~/.gemini/settings.json)
Debug console confirms: "Authenticated via 'vertex-ai'"
Service account created: gemini-cli-service-account@sleepingforest-464615.iam.gserviceaccount.com
IAM role granted: "Vertex AI User" (verified in Google Cloud Console)
Vertex AI API enabled for project sleepingforest-464615
Result: CLI works but subscription quota not applied
Vertex AI method (documented as alternative for enterprise/workspace users):
Status: Debug console claims "Authenticated via 'vertex-ai'"
Issue: API calls fail with CREDENTIALS_MISSING
Configuration verified correct (service account, IAM roles, environment variables)
Result: CLI completely unusable, zero API calls succeed
API Key method:
Status: Not attempted
Reason: Unknown if API keys recognize Code Assist subscription quota
Risk: May incur pay-per-use charges instead of using subscription
Conclusion: No working authentication method exists for using Gemini CLI with Code Assist Standard subscription
Root cause hypothesis:
Based on the error "API keys are not supported by this API" combined with "CREDENTIALS_MISSING", one of the following is likely occurring:
Credential loading failure: Gemini CLI's Vertex AI authentication module is not properly reading GOOGLE_APPLICATION_CREDENTIALS or gcloud ADC
Token generation failure: The CLI successfully loads the service account JSON but fails to exchange it for an OAuth2 access token
Token transmission failure: The CLI generates a valid token but fails to attach it to the Vertex AI API request headers
Environment variable priority issue: Some other environment variable (e.g., GOOGLE_API_KEY from .gemini/.env file) is overriding the service account credentials
Verification that credentials work outside Gemini CLI:
We confirmed the service account credentials are valid by:
Using Python's google.auth.default() to load credentials successfully
Full conversation and debugging logs available upon request.
This issue is blocking paid subscribers from using Gemini CLI with their Code Assist Standard subscriptions. Any guidance on correct authentication configuration or timeline for a fix would be greatly appreciated.
What happened?
Gemini CLI v0.24.0-nightly fails to authenticate using BOTH documented authentication methods (OAuth and Vertex AI) when attempting to use a Gemini Code Assist Standard subscription.
Authentication Method 1: OAuth ("Login with Google") - FAILED
/statsshows: 98.3% quota used on free tier, daily resetsAuthentication Method 2: Vertex AI (Service Account) - FAILED
401 CREDENTIALS_MISSINGerror on every API call despite correct configurationObserved behavior and evidence:
Method 1: OAuth Authentication Attempt
Configuration:
~/.gemini/settings.jsonshows:"selectedType": "oauth-personal"~/.gemini/google_accounts.jsonshows:"active": "cyril@slxxxxxxxxxxxk"Result:
/statsoutput shows:Method 2: Vertex AI Service Account Authentication Attempt
Authentication Configuration:
"selectedType": "vertex-ai"(verified in~/.gemini/settings.json)gemini-cli-service-account@sleepingforest-464615.iam.gserviceaccount.comsleepingforest-464615GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account-key.jsonGOOGLE_CLOUD_PROJECT=sleepingforest-464615GOOGLE_CLOUD_LOCATION=us-central1GOOGLE_GENAI_USE_VERTEXAI=trueError received on every API call:
Key observation: The error message "API keys are not supported by this API" suggests Gemini CLI is either:
Steps to reproduce:
Reproduction Path 1: OAuth Authentication (Fails to recognize subscription)
gemini --model gemini-3-pro-preview/statscommandReproduction Path 2: Vertex AI Authentication (Fails with CREDENTIALS_MISSING)
Environment:
0.24.0-nightly.20251231.05049b5absleepingforest-464615Setup steps:
/path/to/gemini-cli.jsongemini --model gemini-3-pro-preview~/.gemini/settings.jsonshows"selectedType": "vertex-ai"CREDENTIALS_MISSINGAlternative reproduction using gcloud ADC:
gcloud auth activate-service-account --key-file=/path/to/gemini-cli.jsongcloud config set project sleepingforest-464615ln -sf /path/to/gemini-cli.json ~/.config/gcloud/application_default_credentials.jsongcloud auth application-default print-access-token(succeeds)Impact:
Critical issue for Code Assist Standard users:
User experience:
What did you expect to happen?
Gemini CLI should:
GOOGLE_APPLICATION_CREDENTIALSenvironment variableaiplatform.googleapis.comusing the service account's "Vertex AI User" permissionsSpecifically for the "Authenticated via 'vertex-ai'" status:
Client information
Gemini CLI version:
Operating System:
Node.js version:
Google Cloud SDK version:
Python version (for credential testing):
Subscription details:
Login information
Authentication Method 1: Google Account (OAuth)
"selectedType": "oauth-personal"Authentication Method 2: Vertex AI (Service Account)
GOOGLE_APPLICATION_CREDENTIALSenvironment variable pointing to JSON key"selectedType": "vertex-ai"Authentication Method 3: API Key
Anything else we need to know?
This affects Code Assist Standard subscribers specifically:
We systematically tested ALL THREE documented authentication methods:
OAuth method (documented as primary authentication):
Vertex AI method (documented as alternative for enterprise/workspace users):
API Key method:
Conclusion: No working authentication method exists for using Gemini CLI with Code Assist Standard subscription
Root cause hypothesis:
Based on the error "API keys are not supported by this API" combined with "CREDENTIALS_MISSING", one of the following is likely occurring:
GOOGLE_APPLICATION_CREDENTIALSor gcloud ADCGOOGLE_API_KEYfrom.gemini/.envfile) is overriding the service account credentialsVerification that credentials work outside Gemini CLI:
We confirmed the service account credentials are valid by:
google.auth.default()to load credentials successfullygcloud auth application-default print-access-tokensuccessfullyRelated issues:
Full conversation and debugging logs available upon request.
This issue is blocking paid subscribers from using Gemini CLI with their Code Assist Standard subscriptions. Any guidance on correct authentication configuration or timeline for a fix would be greatly appreciated.