Skip to content

feat(proxy): fail over on throttle-403 with short cooldown - #6

Merged
MotionDevLab merged 2 commits into
mainfrom
feat/throttle-403-failover
Oct 10, 2026
Merged

MotionDevLab merged 2 commits into
mainfrom
feat/throttle-403-failover

Conversation

@MotionDevLab

Copy link
Copy Markdown
Owner

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.

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.
@MotionDevLab
MotionDevLab merged commit c139d65 into main Oct 10, 2026
@MotionDevLab
MotionDevLab deleted the feat/throttle-403-failover branch October 10, 2026 10:24
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