It's tedious and frustrating that I can't use GEMINI due to constant API errors in the latest version.
What happened?
The constant API errors I've been experiencing in recent days, where it's impossible for me to establish a proper conversation with GEMINI, are reaching the point of being frustrating, because it prevents you from having a fluid conversation with constant chat interruptions and sometimes the API errors become continuous and force you to reset the session.
- ✕ [API Error: Unexpected line format in response: ,]
- ✕ [API Error: Model stream ended without a finish reason.]
- ✕ [API Error: Model stream ended with empty response text.]
- ✕ [API Error: [{ "error": { "code": 429, "message": "Resource exhausted. Please try again later}]
Every time I send a task to Gemini, I get: - ✕ [API Error: Unexpected line format in response: ,] and sometimes another similar message that instantly cuts off the conversation.
The following are:
✕ [API Error: Unexpected line format in response: ,]
✕ [API Error: Model stream ended without a finish reason.]
✕ [API Error: Model stream ended with empty response text.]
and similar occur very often after a GEMINI file read, even after a response from Gemini. I don't understand.
Then the peak of my frustration is that I've spent 4% of the total, I have 96% left, and I can't continue the conversation because the error keeps popping up:
✕ [API Error: [{
"error": {
"code": 429,
"message": "Resource exhausted. Please try again later. Please refer to
https://cloud.google.com/vertex-ai/generative-ai/docs/error-code-429 for more details.",
"errors": [
{
"message": "Resource exhausted. Please try again later. Please refer to
https://cloud.google.com/vertex-ai/generative-ai/docs/error-code-429 for more details.",
"domain": "global",
"reason": "rateLimitExceeded"
}
],
"status": "RESOURCE_EXHAUSTED"
}
}
]]
Possible quota limitations in place or slow response times detected. Switching to the gemini-2.5-flash model for
the rest of this session.
PRO Exhausted???!! what I don't understand
╭───────────────────────────────────────────────────────
│
│ Model Stats For Nerds
│
│ Metric gemini-2.5-pro
│ ─────────────────────────────────────────────────────
│ API
│ Requests 39
│ Errors 4 (10.3%)
│ Avg Latency 13.6s
│
│ Tokens
│ Total 1.324.654
│ ↳ Prompt 1.288.364
│ ↳ Cached 598.782 (46.5%)
│ ↳ Thoughts 26.394
│ ↳ Output 9896
│
╰───────────────────────────────────────────────────────
With many erros and this.... WTF... fix this now, it has already reached a frustrating point of having to reset and start because it doesn't work if you save the chat and continue.
What did you expect to happen?
.
Client information
About Gemini CLI
CLI Version 0.8.1
Model gemini-2.5-pro
Sandbox no sandbox
OS win32
Auth Method OAuth
GCP Project yachty-ascent-hjsv8
Login information
No response
Anything else we need to know?
No response
Failed to generate JSON content:
request to https://cloudcode-pa.googleapis.com/v1internal:generateContent failed,
reason: socket hang up
Same problem!
gemini cli still gives empty message errors, Is it worth changing models?
Absolutely baffled. There is no way i use my quota limits. I used the gemini cli extensively yesterday and that's when I got the first error of this kind and i thought, ok perhaps I used it too much and I stopped. And today I come back and after few normal conversations I get this:
✕ [API Error: [{
"error": {
"code": 429,
"message": "Resource exhausted. Please try again later. Please refer to
https://cloud.google.com/vertex-ai/generative-ai/docs/error-code-429 for more details.",
"errors": [
{
"message": "Resource exhausted. Please try again later. Please refer to
https://cloud.google.com/vertex-ai/generative-ai/docs/error-code-429 for more details.",
"domain": "global",
"reason": "rateLimitExceeded"
}
],
"status": "RESOURCE_EXHAUSTED"
}
}
]]
Possible quota limitations in place or slow response times detected. Switching to the gemini-2.5-flash
model for the rest of this session.
I would love to know what my "rate limit" is and how much of it I used. I don't think that with my Pro subscription I should be getting these limits...
I am also getting alot of 503 error, could anyone from the Gemini cli team explain what does the following message means:
✕ [API Error: got status: UNAVAILABLE. {"error":{"code":503,"message":"The model is overloaded. Please try again
later.","status":"UNAVAILABLE"}}]
Where is the model overloaded ?
I am using an gemini api key on a paid account, and did not hit any rate limit....
Running gemini version 0.8.1
These issues have basically made gemini-cli unusable.
By chance is anyone else whose having issues signed up via "Google Developer"? I re-authed with a non-subscribed gmail account, and it's at least not kicking back the 429 errors.
So I went to cancel my "Google Developer" account, and figured out that it seems like signing up through that joined my gmail in a "Google Cloud" project belonging to a "Gemini Code Assist" billing account that I don't have permissions for. It's the only project in my GCP account with anything related to Gemini enabled. So my theory is that the particular project in GCP that "Google Developer" joined me to, might be at it's own project usage limit and that might be why we're all hitting 429 errors.
Linking others reporting similar issue #10722 #10745
Same problem here. Yesterday it was fine. This makes it unusable. I understand that it needs to switch to Flash from Pro from time to time, but this happens with flash also.
I am also getting this error frequently [API Error: Model stream ended with empty response text.] It's frustrating.
Same thing here.
[API Error: [{ "error": { "code": 429, "message": "Resource exhausted. Please try again later. Please refer to https://cloud.google.com/vertex-ai/generative-ai/docs/error-code-429 for more details.", "errors": [ { "message": "Resource exhausted. Please try again later. Please refer to https://cloud.google.com/vertex-ai/generative-ai/docs/error-code-429 for more details.", "domain": "global", "reason": "rateLimitExceeded" } ], "status": "RESOURCE_EXHAUSTED" } } ]] Possible quota limitations in place or slow response times detected. Switching to the Gemini-2.5-flash model for the rest of this session.
And i haven't spent my daily request quota. Also, it does not switch to Gemini-2.5-flash automatically, possibly because this is not a quota issue, it's a bug. Sometimes i don't even spend 2 or 3 requests, and this error happens.
I've been noticing the same problems for the last few days. I once had over 100 such errors in one session, which lasted over several hours (without getting much done due to these recurring errors). Since then, I started restarting Gemini when these problems started to occur. After a restart, the problems tend to disappear, only to return after a while. Then, you restart Gemini again, and so on. It is really not ideal to have to restart Gemini CLI again and again since you lose context and you'll have to explain again what you are doing to Gemini, but that seems to be the only way to be able to use Gemini in the face of these recurring errors.
Are you paying google services? I am not, and thus there errors are frequent. Not a problem in YOUR quota, but their servers are overloaded most of the time, some users get priority to the processing queue, others do not and are just thrown an error at instead.
I have a paid plan and every shell output now gets "[[API Error: Model stream ended with empty response text.]". Making it unusable to use.
same problem here... verrryyyy annoying
The full text of the system instruction (4,375 tokens) is re-uploading with every single API request. This causes the application to hit the Tokens Per Minute quota almost instantly, even if Requests Per Minute count is low.