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 #20098
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.
This appears to be a feature request, but it does not use the Feature Request template (missing the verification checkbox and [FEATURE]: title prefix). Please resubmit using the correct template, or clarify if this is intended as a bug report and include reproduction steps.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of or closely related to existing issues. Please check:
changed the title [-]No automatic model fallback on transient provider errors[/-][+][FEATURE]: Configurable provider/model fallback on transient errors[/+]on Mar 30, 2026
Thanks for updating the issue! It now follows the contributing guidelines and feature request template. We appreciate the clear description and the context you provided.
Activity
github-actions commentedon Mar 30, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
[FEATURE]:title prefix). Please resubmit using the correct template, or clarify if this is intended as a bug report and include reproduction steps.Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of or closely related to existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
[-]No automatic model fallback on transient provider errors[/-][+][FEATURE]: Configurable provider/model fallback on transient errors[/+]ESRE-dev commentedon Mar 30, 2026
Closing in favor of template-compliant replacement #20100.
github-actions commentedon Mar 30, 2026
Thanks for updating the issue! It now follows the contributing guidelines and feature request template. We appreciate the clear description and the context you provided.