fix(opencode): cap retry attempts at 5 to prevent infinite loops#29047
fix(opencode): cap retry attempts at 5 to prevent infinite loops#29047niStee wants to merge 1 commit into
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found related PRs that address retry logic and capping attempts: Potential Related PRs:
Why they're related: All three PRs address preventing infinite retry loops by introducing caps on retry attempts. PR #29047 appears to be addressing the same problem at a different layer (opencode vs session) with a higher cap (5 vs 3). You may want to check if these efforts should be coordinated or if they're addressing different retry mechanisms. |
597160e to
fa90a0f
Compare
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Issue for this PR
Closes #29143
Type of change
What does this PR do?
Prevents infinite retry loops when a provider consistently fails by capping retry attempts at 5. This ensures the fallback system can proceed to the next configured model instead of spinning indefinitely on a broken provider.
How did you verify your code works?
Tested locally by simulating a consistent provider failure and verifying that the retry loop breaks after 5 attempts, correctly returning an exhaustion status to the caller.
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist