Repository navigation
fix(combo): model lockout honors long upstream quota reset - #4429
Merged
diegosouzapw merged 2 commits intoJun 20, 2026
Merged
diegosouzapw merged 2 commits into
diegosouzapw merged 2 commits into
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
… 9router#1308) A combo per-model lockout capped at the short base cooldown (~minutes) and discarded the long upstream quota reset that checkFallbackError/ parseRetryFromErrorText had already parsed (e.g. Antigravity "Resets in 160h27m24s"), so an exhausted model kept being retried within minutes. Add a pure helper selectLockoutCooldownMs(parsedCooldownMs, settings) that returns the parsed reset as exactCooldownMs when it exceeds the base cooldown, otherwise preserving the previous behavior (0 → exponential backoff, or base when backoff is disabled). Both combo lockout call sites now use it. Also fix the Antigravity executor's parseRetryFromErrorMessage regex (reset -> resets?) so the plural "Resets in …" phrasing matches. Reported-by: Ansh7473 (decolua/9router#1308)
diegosouzapw
force-pushed
the
fix/port-issue-1308-model-lockout-honors-reset
branch
from
June 20, 2026 23:33
9bcd0b5 to
c6d964c
Compare
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
…nference#4429) Integrated into release/v3.8.32
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.
Summary
Resets in 160h27m24s, aRetry-Afterheader). The exhausted model was therefore retried again within minutes, hammering an upstream that won't recover for hours/days.Root cause
checkFallbackError/parseRetryFromErrorTextalready extract the long reset intocooldownMs, andcooldownMsis in scope at both combo model-lockout call sites inopen-sse/services/combo.ts— but those sites passedexactCooldownMsas0(exponential backoff) orbaseCooldownMs, never the parsed reset. Separately, the Antigravity executor's ownparseRetryFromErrorMessageregex/reset (?:after|in)/idid not match the pluralResets in …phrasing.Fix
selectLockoutCooldownMs(parsedCooldownMs, { baseCooldownMs, useExponentialBackoff })inaccountFallback.ts: returns the parsed reset when it exceeds the base cooldown, else preserves the previous behavior (0→ exponential backoff, or base when backoff is disabled).recordModelLockoutFailurealready honors a positiveexactCooldownMsexactly (bypassing backoff/cap).selectLockoutCooldownMs(cooldownMs, mlSettings).parseRetryFromErrorMessageregexreset→resets?soResets in 160h27m24smatches.Test plan
tests/unit/combo-model-lockout-honors-reset-1308.test.ts(helper 3 cases + end-to-end lockout ~160h viagetModelLockoutInfo+ centralparseRetryFromErrorText+ AntigravityparseRetryFromErrorMessage) — RED before, GREEN after (6/6)antigravity-429-quota-cooldown+executor-antigravity— 31 pass / 0 failnpx eslint— 0 errors ·npm run typecheck:core— clean ·npm run check:any-budget:t11— PASS ·npm run check:file-size— OK (baseline bumped with_rebaseline_2026_06_20_1308…justification)Attribution
Thanks to @Ansh7473 for the original report.