Skip to content

handle (Gemini) rate limits more gracefully #490

Closed

Description

@aspiers

I selected Gemini 2.5 Flash (which I believe is a free model), and am regularly seeing this:

Image

However after waiting a short while, I can submit a new prompt and continue without any issues. This makes sense because according to https://ai.google.dev/gemini-api/docs/rate-limits, the free model is limited to 10 requests per minute.

So ideally opencode would:

  • know the rate limits for each model
  • keep track of how close its usage is to that limit
  • warn when it's getting close to the limit
  • when the limit gets hit, pause for the appropriate amount of time showing a countdown timer and an explanation of what's going on together with some suggestions on how to overcome the limit (e.g. by changing to a paid model)

Activity

  1. changed the title [-]hitting Gemini rate limits[/-] [+]handle Gemini rate limits more gracefully[/+] on Jun 27, 2025
  2. changed the title [-]handle Gemini rate limits more gracefully[/-] [+]handle (Gemini) rate limits more gracefully[/+] on Jun 27, 2025
  3. self-assigned this
    on Jun 30, 2025
  4. furai commented on Jun 30, 2025

    @furai
    Contributor

    I'm actually getting the same for Claude, should I open new issue?

    EDIT: it seems that this only applies for using anthropic through API key not oauth?

  5. grigio commented on Aug 4, 2025

    @grigio

    I also have this issue with openrouter

  6. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

    [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions