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

Instant Pro rate limit quota exceeded.

Open keithcorcoran opened this issue 1 year ago • 2 comments

What happened?

Ran Gemini CLI for the first time in almost a week. Sent my first prompt (7kb txt file) and immediately got:

⚡ You have reached your daily quota limit. ⚡ Automatically switching from gemini-2.5-pro to gemini-2.5-flash for the remainder of this session. ⚡ To increase your limits, upgrade to a Gemini Code Assist Standard or Enterprise plan with higher limits at https://goo.gle/set-up-gemini-code-assist ⚡ Or you can utilize a Gemini API Key. See: https://goo.gle/gemini-cli-docs-auth#gemini-api-key ⚡ You can switch authentication methods by typing /auth ✕ [API Error: Please submit a new query to continue with the Flash model.]

What did you expect to happen?

I expected to use Gemini CLI as I had previously without this issue.

Client information

  • CLI Version: 0.1.10
  • Git Commit: da50a1ee (local modifications)
  • Operating System: win32 v20.11.1
  • Sandbox Environment: no sandbox
  • Model Version: gemini-2.5-pro
  • Memory Usage: 125.2 MB

Login information

Hoogle account oAuth

Anything else we need to know?

No response

keithcorcoran avatar Jul 10 '25 17:07 keithcorcoran

Same here. All was fine yesterday, I used pro for a bit and then the quota exceeded message appeared. Fair enough, I thought. But today on the first prompt attempt I was told the same thing. When is a new day starting? My timezone? Google's timezone? I checked the Google Cloud console under 'IAM and admin' and there's no reporting on any related API and its quota. Just some Maps JS API I haven't used in years. I tried to ask the Google Cloud Assist bot, it spins in circles not even able to reply with hello.

ltomuta avatar Jul 15 '25 06:07 ltomuta

So i dug a little and did some amateur testing. With help of just conversing with gemini about it and asking it to estimate token length of my requests and explain wtf was happening I was able to at least address my specific issue..

My prompt had it looping through 10-20 files to create an individual analysis of each file and I hit the rate limit on pro in about 10 files (between 4-50k each) even though I told it not to maintain context between files.

The issue was that the mega size system prompt was being called every time, then the context of every previous file and analysis with the new prompt and file and full checklist was creating a linear increase in token count so it was likely more that i wasn't hitting CPM or CPD or TPM limits but likely when i started hitting 10s of millions of input tokens in under 15 mins, it triggered a flag.\

I ended up having gemini write me a script to construct a prompt from the prompt template, file content and response template, start a new subprocess and submit the entire payload as a stateless request. Some payloads large as 150k. Script collects the response, saves it, updates the checklist, then sents a new payload as another new stateless session. I got through 60-80 files using Pro in about 35 minutes and didn't hit rate limit.

Give it a try. Open a new interactive session in a decent size codebase and just say "Hello." Then run /stats. System prompt isn't small plus it scans and sends a full recursive folder listing (maybe files too). It sounded like it sends this with every request but might just drop it in the context window.

keithcorcoran avatar Jul 16 '25 20:07 keithcorcoran