Repository navigation
feat(proxy): fail over on throttle-403 with short cooldown - #6
Merged
Merged
Conversation
Empty-body / throttle-phrased upstream 403 cools the hot key (60s fallback via resolveCooldownMs, no quota signal) and fails over same-request. Genuine auth 403s stay count-only. Plan: docs/opencode-go-multi-auth/plans/2026-10-10-throttle-403-failover.md. Mirror of openclaude 9f9c4e5 isTransientThrottleMessage.
Branch recordRequest now runs on failover attempts only; on the last attempt the tail recordRequest counts the verbatim 403 once. Avoids requestCount/errorCount double-count and latency skew. Cooldown, breaker, markError and affinity protection still apply on every throttle hit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Empty-body / throttle-phrased upstream 403 cools the hot key (60s fallback via resolveCooldownMs, no quota signal) and fails over same-request. Genuine auth 403s stay count-only. Includes single-count guard so the last-attempt verbatim 403 is tallied once by the tail recorder. Plan: docs/opencode-go-multi-auth/plans/2026-10-10-throttle-403-failover.md. Mirror of openclaude 9f9c4e5 isTransientThrottleMessage. Verified: typecheck + build green, 31 detector checks + 14 keymanager/affinity checks green, matcher diffed line-by-line against reference.