Skip to content

OpenCode 2: retries try untried accounts before ones that already refused - #865

Closed
antauth-alfonso[bot] wants to merge 3 commits into
mainfrom
fix/862-retry-excluded
Closed

antauth-alfonso[bot] wants to merge 3 commits into
mainfrom
fix/862-retry-excluded

Conversation

@antauth-alfonso

@antauth-alfonso antauth-alfonso Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Refs #862. Retry phase now skips the last refuser and confirmed-exhausted accounts, prefers accounts not in the request's excluded set, and only cycles back to a transient refuser when no untried account can serve.


Summary by cubic

Changes retry routing in OpenCode 2 so a rate-limited request tries accounts that have not yet refused it before cycling back to one that already refused, and skips accounts with confirmed exhaustion.

  • Retries now prefer untried accounts in both ordinary routing and shared routing advice.
  • The last refuser is always skipped; a transient refuser is revisited only when no untried account can serve.
  • Shared routing advice is accepted only after untried accounts, and advice picks with confirmed exhaustion are filtered out.

Written for commit bfea902. Summary will update on new commits.

View guided diff Turn on auto-fix

Exclude every account that refused the request and skip confirmed exhaustion during retry selection, including shared routing picks. Keep same-account holds and continuations ahead of that filtering.

The unconfirmed-429 hold test still checks both allowed holds per account. Its last assertion now keeps the host stop instead of requiring an immediate reroute back to the first refused account.
Prefer untried accounts for both ordinary and shared routing, then allow earlier refusers only if no untried account can serve. Continue to skip the last refuser and confirmed exhaustion.

Restore the two-account test expectation that a turn can cycle after both transient refusals have used their holds. Cover all three accounts and the shared advice preference through the installer.
@antauth-alfonso

Copy link
Copy Markdown
Author

Squash-merged to main as cf18281.

@antauth-alfonso antauth-alfonso Bot closed this Nov 22, 2026
@ualtinok
ualtinok deleted the fix/862-retry-excluded branch November 22, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant