Persistent Authentication Issues with Gemini CLI #935
wisewolf26
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
[INFO] Calling AI service to generate tasks from PRD... ⠹ Parsing PRD and generating tasks... [ERROR] Gemini CLI object generation failed: Failed to initialize Gemini model: Error: Error creating contentGenerator: Unsupported authType: undefined {"error":{"name":"AI_APICallError","cause":{},"url":"gemini-cli-core","requestBodyValues":{},"statusCode":404,"responseHeaders":{},"isRetryable":false,"data":{}}} [WARN] Attempt 1 failed for role main (generateObject / gemini-cli): Gemini CLI API error during object generation: Failed to initialize Gemini model: Error: Error creating contentGenerator: Unsupported authType: undefined [ERROR] Something went wrong on the provider side. Max retries reached for role main (generateObject / gemini-cli). [ERROR] Service call failed for role main (Provider: gemini-cli, Model: gemini-2.5-pro): Gemini CLI API error during object generation: Failed to initialize Gemini model: Error: Error creating contentGenerator: Unsupported authType: undefined
"main": { "provider": "gemini-cli", "modelId": "gemini-2.5-pro", "maxTokens": 65536, "temperature": 0.7 },
I have set Gemini as the default model and have also completed the CLI installation. However, I am continuously encountering authentication-related errors. While the Gemini CLI uses login-based authentication by default, the Gemini API key has also been entered in both the .env file and the MCP configuration.
Furthermore, although the same API key is configured in both .env and mcp.json, it seems that Google and the Gemini CLI are recognizing them differently.
Beta Was this translation helpful? Give feedback.
All reactions