You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support multiple API keys per provider with fallback logic #1326
Under heavy usage, multiple Opencode instances hit rate limits, causing failures and interrupting sessions.
Proposed Solution
Allow users to configure multiple API keys for each LLM provider and automatically fallback to the next key when the current one returns a rate limit error (e.g. HTTP 429) or other failures.
On each request:
Try with the primary key.
If rate‑limited or failed, automatically retry with the next key.
Continue until a key succeeds or all fail.
Provide optional logs/metrics showing fallback usage (which key, error type).
Closing this issue as it's not currently planned for implementation unless there's more demand from the community. If multiple users request this feature or you're experiencing significant rate limiting issues, please feel free to open a new issue with updated use cases and we can reconsider. Thanks for the suggestion!
Activity
thdxr commentedon Aug 12, 2025
Closing this issue as it's not currently planned for implementation unless there's more demand from the community. If multiple users request this feature or you're experiencing significant rate limiting issues, please feel free to open a new issue with updated use cases and we can reconsider. Thanks for the suggestion!
s-khaon commentedon Jan 28, 2026
+1
fadedlamp42 commentedon Feb 17, 2026
+1, would love simple array support in
auth.json(sokeyfor a single key orkeysfor multiple)George-RD commentedon Feb 23, 2026
Please!
harish2222 commentedon Jun 20, 2026
ya bro please it will help alot