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

BUG: Api Resource Limit Errors swallowed in non-interactive mode

Open mattKorwel opened this issue 7 months ago • 7 comments

Describe the bug While working on a feature today i started getting 429's and 500's. And the api started telling me i was downgraded to flash. In interactive mode I saw the below error message. In non-interactive mode I simply stopped getting responses and it seems we were swallowing those errors.

Additional context

✕ [API Error: got status: 429 Too Many Requests. {"error":{"message":"{\n  \"error\": {\n    \"code\": 429,\n    \"message\": \"You exceeded 
  your current quota. Go to https://aistudio.google.com/apikey to upgrade your quota tier, or submit a quota increase request in 
  https://ai.google.dev/gemini-api/docs/rate-limits#request-rate-limit-increase\",\n    \"status\": \"RESOURCE_EXHAUSTED\",\n    \"details\": 
  [\n      {\n        \"@type\": \"type.googleapis.com/google.rpc.QuotaFailure\",\n        \"violations\": [\n          {\n            
  \"quotaMetric\": \"generativelanguage.googleapis.com/generate_requests_per_model_per_day\",\n            \"quotaId\": 
  \"GenerateRequestsPerDayPerProjectPerModel\"\n          }\n        ]\n      },\n      {\n        \"@type\": 
  \"type.googleapis.com/google.rpc.Help\",\n        \"links\": [\n          {\n            \"description\": \"Learn more about Gemini API 
  quotas\",\n            \"url\": \"https://ai.google.dev/gemini-api/docs/rate-limits\"\n          }\n        ]\n      }\n    ]\n  
  }\n}\n","code":429,"status":"Too Many Requests"}}]```

mattKorwel avatar Jun 16 '25 05:06 mattKorwel

Image Image

mattKorwel avatar Jun 16 '25 05:06 mattKorwel

Filed this too: https://b.corp.google.com/issues/425238450

NTaylorMullen avatar Jun 16 '25 05:06 NTaylorMullen

https://github.com/google-gemini/gemini-cli/issues/1502#issuecomment-3005832570

pomazanbohdan avatar Jun 25 '25 19:06 pomazanbohdan

Good catch, @mattKorwel , we need to make sure we're letting users in -p mode know.

fhinkel avatar Jun 25 '25 19:06 fhinkel

Wait, @mattKorwel where do you see these graphs?

cosmicdreams avatar Jun 25 '25 23:06 cosmicdreams

I have fixed it https://github.com/google-gemini/gemini-cli/pull/6142

morningstarxcdcode avatar Aug 13 '25 14:08 morningstarxcdcode

@mattKorwel Hey Matt, I have improved error handling in non-interactive mode, can you please check if this is resolved.

megha1188 avatar Dec 05 '25 05:12 megha1188