feat(provider): automatic model fallback on transient errors#20105
feat(provider): automatic model fallback on transient errors#20105ESRE-dev wants to merge 1 commit intoanomalyco:devfrom
Conversation
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
The following comment was made by an LLM, it may be inaccurate: Based on the search results, I found some potentially related PRs that deal with provider fallback and error handling: Potentially Related PRs:
These PRs have overlapping concerns with fallback behavior and provider error handling, though they may be from different time periods or addressing different aspects of the feature. |
- Add ProviderFallback module for configurable model fallback - Integrate fallback middleware into LLM stream pipeline - shouldFallback() handles 429, 500, 502, 503, transient 403 - Copilot-specific: reauth guidance for 403, transient retryability - Config: fallback mapping (providerID/modelID → fallback target)
a565674 to
46fe331
Compare
Issue for this PR
Closes #20100
Type of change
What does this PR do?
Adds configurable provider/model fallback to improve resilience when the primary provider is temporarily degraded.
This PR introduces:
Provider fallback module
LLM pipeline integration
Transient error classification improvements
Config support
primary -> fallback) to allow user-controlled failover behavior.This is broader than #19394 (provider-specific retryability) and provides general cross-provider fallback behavior.
How did you verify your code works?
packages/opencode/test/provider/fallback.test.ts.Screenshots / recordings
Not a UI change.
Checklist
If you do not follow this template your PR will be automatically rejected.