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
[FEATURE]: Configurable provider/model fallback on transient errors #20100
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Add configurable provider/model fallback so OpenCode can recover from transient provider failures by retrying once on an alternative model.
When the primary provider returns transient errors (for example 429, 500, 502, 503, or transient 403 from some gateways), sessions currently retry only on the same provider and can still fail after retries are exhausted. If users have multiple providers configured, OpenCode should be able to fail over automatically.
Requested behavior:
Add a fallback config map (primary -> fallback), e.g.:
Provide clearer guidance for copilot-style transient 403s where reauthentication may be needed.
This is broader than #19394 (provider-specific retryability bug). #19394 focuses on Anthropic 5xx retry classification; this request adds general cross-provider fallback behavior.
Why this matters
Improves reliability when one provider is degraded.
Reduces user-facing session failures during transient outages/rate limits.
Lets teams configure resilient multi-provider operation without manual intervention.
I was just thinking about creating an issue for this as well. As I like to use subagents quite a bit, would be great to be able to have subagents have fallback models in case current model has reached quota limits, is unavailable, or any other error that means model cannot move forward to have it fallback to one or more models for it to continue work. This use case is especially viable with something like https://github.com/code-yeongyu/oh-my-openagent where agents hang if model unreachable or rate limited.
Activity
github-actions commentedon Mar 30, 2026
This issue might be a duplicate of existing issues. Please check:
ChristianPerez34 commentedon Apr 7, 2026
I was just thinking about creating an issue for this as well. As I like to use subagents quite a bit, would be great to be able to have subagents have fallback models in case current model has reached quota limits, is unavailable, or any other error that means model cannot move forward to have it fallback to one or more models for it to continue work. This use case is especially viable with something like https://github.com/code-yeongyu/oh-my-openagent where agents hang if model unreachable or rate limited.
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.