anomalyco / anomalyco/opencode
[Feature Request / Bug] Handle Rate Limit (Quota Exceeded 429) automatically with retry delay
@neriousy is already working on this.
Since Sep 14, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Description: When using Gemini API models (e.g., gemini-3.8-flash) on the free tier, hitting rate limits results in a hard failure instead of automatic waiting/retrying based on the suggested backoff time.
Error Message:
You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. To monitor your current usage, head to: https://ai.dev/rate-limit.
- Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free_tier_requests, limit: 20, model: gemini-3.8-flash
Please retry in 38.601658672s.
Proposed Solution: Implement automatic retry logic (exponential backoff or waiting for the exact seconds specified in the error message like Please retry in X seconds) when encountering API quota/rate-limit errors.
Plugins
No response
OpenCode version
1.18.31
Steps to reproduce
Ask any question requiring a sequence of 5–10 processing steps using the latest Gemini LLM via the Gemini API.
Screenshot and/or share link
No response
Operating System
fedora 44
Terminal
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.