Describe the enhancement you want to request
as #1326 has been closed and it seems the feature has gained some interest, here is another issue as suggested
Problem
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).
Describe the enhancement you want to request
as #1326 has been closed and it seems the feature has gained some interest, here is another issue as suggested
Problem
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: