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

Draft
AN
14h ago
+280-22

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.