Auth with both GOOGLE and GEMINI keys set fails with unclear error message
What happened?
When selecting "Gemini API Key" as auth method, I'm getting API Error: API keys are not supported by this API. Expected OAuth2 access token or other authentication credentials that assert a principal. See https://cloud.google.com/docs/authentication (Status: UNAUTHENTICATED)
No other error indication. Only when using debug mode, I see what the issue is: ⚠ Both GOOGLE_API_KEY and GEMINI_API_KEY are set. Using GOOGLE_API_KEY. │ │ ℹ Authenticated via "gemini-api-key".
Please make sure that is surfaced in the error message as most people don't know about debug mode. Thanks!
What did you expect to happen?
.
Client information
0.1.4 release
Login information
No response
Anything else we need to know?
No response
Interestingly, this error is not coming from our code. It's coming from the GenAI library. I believe this might be due to recent changes we made to how keys are passed. Should be a simple fix.
Interestingly, this error is not coming from our code. It's coming from the GenAI library. I believe this might be due to recent changes we made to how keys are passed. Should be a simple fix.
https://github.com/google-gemini/gemini-cli/pull/1381 has a fix.
Same here. It´s a total mess.
Assigning this to mboshernitsan since he has the PR to address it.