gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

API Error: Model stream ended with empty response text.

Open Jkith-dev opened this issue 1 year ago • 18 comments

What happened?

With the latest version I am getting these API Errors quite a bit. It says:

✕ [API Error: Model stream ended with empty response text.]

and then stops the workflow. I usually have to reprompt it saying "You received an API error, please continue your workflow".

This seems to happen mainly when reading many files, but it has happened other places as well.

What did you expect to happen?

I expected Gemini CLI to finish it's workflow.

Client information

  • CLI Version: 0.8.1
  • Git Commit: a0987602
  • Session ID: f1a510e2-d80f-4288-b455-deaafb088e5f
  • Operating System: win32 v22.17.0
  • Sandbox Environment: no sandbox
  • Model Version: gemini-2.5-pro
  • Memory Usage: 458.8 MB

Login information

I login with a Google Workspace account with Code Assist Subscription

Anything else we need to know?

This API error has been happening way more (it seems) with version 0.8.x.

Jkith-dev avatar Oct 09 '25 13:10 Jkith-dev

same

flroexus avatar Oct 09 '25 14:10 flroexus

Seems like a lot of folks are seeing this, not sure that's expected and just not being handled gracefully, or indicative or something more serious. Either way gonna concentrate the efforts in #10672 which is about the same thing 🙏

bobcatfish avatar Oct 09 '25 15:10 bobcatfish

same

kayces avatar Oct 11 '25 10:10 kayces

same

rashidee avatar Oct 11 '25 15:10 rashidee

i get this all the time its extremely annoying because he has to read the context again and is essentially burning tokens doing that, very scammy action. Claude code never has this problem or very rarely,

puppetmaster666 avatar Oct 11 '25 17:10 puppetmaster666

yeah it happened almost every single time. and i also noticed that it usually have this issue only after it finished a change (such a edit/copy or whatever, no mater the change is successful or not).

LingTravel avatar Oct 11 '25 18:10 LingTravel

Same.

djoleluk avatar Oct 12 '25 08:10 djoleluk

Same Please fix it.

frankcheng2008 avatar Oct 12 '25 13:10 frankcheng2008

https://github.com/google-gemini/gemini-cli/issues/10678 add a timeout option can fix it timeout: 300000, // 5 minutes (300000ms) instead of default 0

frankcheng2008 avatar Oct 13 '25 01:10 frankcheng2008

Same.

Alexlin7 avatar Oct 13 '25 09:10 Alexlin7

It is highly annoying. I can barely make progress. It is happening quite a bit. Using "You received an API error, please continue your workflow" works for me.

Update: it is not working and is making the tool unusable.

garcialopezco avatar Oct 14 '25 00:10 garcialopezco

Same. too much annoying

mohiuddin200 avatar Oct 14 '25 12:10 mohiuddin200

same! Got this multiple times in single therad.

sourabhkhot-ns avatar Oct 14 '25 13:10 sourabhkhot-ns

Yes. And also today the gemini cli is so dumb omfg

flroexus avatar Oct 14 '25 13:10 flroexus

same

mordenkainennn avatar Oct 15 '25 06:10 mordenkainennn

same

Joffey avatar Oct 15 '25 15:10 Joffey

Same. The tool has turned into garbage.

Ksiw avatar Oct 15 '25 20:10 Ksiw

same

HandsomeBisu avatar Oct 17 '25 14:10 HandsomeBisu