1jehuang / 1jehuang/jcode

Gemini API provider hangs indefinitely during login and run despite valid API key

Open
#660 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-info priority: medium triage: reproducible
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
  1. Create a valid Gemini API key.
  2. Save it to:
    ~/Library/Application Support/jcode/gemini.env

Contents:

GEMINI_API_KEY=YOUR_KEY

  1. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.