opencode-gemini-auth icon indicating copy to clipboard operation
opencode-gemini-auth copied to clipboard

[Bug]: Too many request alert

Open LeoLedesma opened this issue 10 months ago • 13 comments

Description

Hi there, When I use Gemini 3 Pro Review in the CLI and the model is working, this error appears below the prompt box

Image

Reproduction Steps

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected Behavior

A clear and concise description of what you expected to happen.

Actual Behavior

A clear and concise description of what actually happens.

Screenshots

Image

Environment

  • OS: Windows
  • Version: [e.g. 22]

Opencode Information

  • Opencode Type: CLI
  • Opencode Version: [1.1.13]
  • Opencode Settings: { "$schema": "https://opencode.ai/config.json", "plugin": ["opencode-gemini-auth@latest"], "provider": { "google": { "models": { "gemini-3-pro-preview": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } } } } } }

Regards

LeoLedesma avatar Jan 11 '26 23:01 LeoLedesma

Same issue, seems to be blocked from google side most likely.

barthuijgen avatar Jan 13 '26 16:01 barthuijgen

Don't think its a straight up block? Probably just OpenCode hitting a ratelimit which might be because gemini-cli doesn't send requests as frequently? If that's the case, then it would be cool if the ratelimit could be improved in OpenCode, so we don't seem to abusing it.

gaardhus avatar Jan 16 '26 20:01 gaardhus

I'm encountering the same issue. However, it works perfectly fine in the gemini cli, but fails in opencode. opencode err log: Too Many Requests: [{ "error": { "code": 429, "message": "You have exhausted your capacity on this model. Your quota will reset after 5h17m19s.", "errors": [ { "message": "You have exhausted your capacity on this model. Your quota will reset after 5h17m19s.", "domain": "global", "reason": "rateLimitExceeded" } ], "status": "RESOURCE_EXHAUSTED", "details": [ { "@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "QUOTA_EXHAUSTED", "domain": "cloudcode-pa.googleapis.com", "metadata": { "quotaResetTimeStamp": "2026-01-17T12:36:46Z", "uiMessage": "true", "model": "gemini-3-pro-preview", "quotaResetDelay": "5h17m19.205229762s"

biandan avatar Jan 17 '26 07:01 biandan

Any workaround for this? or any fix?

mateusbadalotti avatar Jan 25 '26 13:01 mateusbadalotti

Any workaround for this? or any fix?

Just use Gemini CLI :D

febryanvaldo avatar Jan 31 '26 16:01 febryanvaldo

A couple important points:

  1. Gemini CLI auto‑fallbacks. When it runs out of quota for a Pro model, it can automatically fall back to Flash, so it may look like “it works” even though the Pro bucket is exhausted.
  2. Opencode plugin project context. If you don’t set a projectId in the plugin config, the plugin uses a managed free‑tier project. That project has its own quota and can hit 429s quickly.

To get paid quotas in Opencode, set a project ID and re‑auth so requests use your paid project. Also make sure both tools are using the same model, because quotas are per‑model.

jenslys avatar Jan 31 '26 17:01 jenslys

please refer to https://github.com/jenslys/opencode-gemini-auth/issues/46#issuecomment-3862356002 seems the same issue

ezetina86 avatar Feb 06 '26 20:02 ezetina86

Any workaround for this? or any fix?

Try using gemini-2.5-flash that works for me.

ezetina86 avatar Feb 06 '26 20:02 ezetina86

I get this temporary rate limit error all the time with a Gemini Pro account using gemini-2.5-flash (and others, but that's what I use most often) with a projectID specified in my opencode.json. My intuition is that there's something in the code that google/gemini doesn't like.

Btw this looks like same issue as #25

bdwelle avatar Feb 10 '26 00:02 bdwelle

Since yesterday, it has gotten worse for me. I have a full quota left but couldn't properly use any model now. I tried adding the project id and re-authenticating, but no luck.

smk87 avatar Feb 26 '26 07:02 smk87

I have the same problem. When it retries, the request always succeeds.

Dohmanlechx avatar Feb 26 '26 20:02 Dohmanlechx

I have the same problem. When it retries, the request always succeeds.

The agent automatically retries after a few seconds, and then it succeeds. But then it happens again, and again it retries, and so on. This makes the execution very slow and unusable, sadly. For now I have started using another plugin.

smk87 avatar Feb 27 '26 10:02 smk87

Same issue, about 5 minutes to respond a "hello" between errors

alohl669 avatar Feb 28 '26 18:02 alohl669