Gemini API provider hangs indefinitely during login and run despite valid API key
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 19.9k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 30
Description
Summary
The gemini-api provider appears to hang indefinitely, even though the API key is valid and works outside of jcode.
Environment
- jcode: v0.61.1
- macOS
- Provider: gemini-api
What happens
- Create a valid Gemini API key.
- Save it to:
~/Library/Application Support/jcode/gemini.env
Contents:
GEMINI_API_KEY=YOUR_KEY
- Run:
jcode login --provider gemini-api
or
jcode --provider gemini-api run "Say hello"
Both commands hang indefinitely and never return.
Expected behavior
The provider should authenticate successfully and respond to the prompt.
What has already been verified
The API key is valid.
Running this directly with curl works immediately:
curl -X POST \
"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=MY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents":[{"parts":[{"text":"Say hi"}]}]
}'
Thank you so much for working on this issue and I hope it will be fixed soon.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing jcode login --provider gemini-api and jcode --provider gemini-api run "Say hello" with the key from ~/Library/Application Support/jcode/gemini.env, then compare the behavior with the working curl request. Done means both commands authenticate and return a response instead of hanging indefinitely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- ai, api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100