Repository navigation
fix(providers): route Claude quota warnings and report applicable resets - #15624
Merged
diegosouzapw merged 6 commits intoOct 7, 2026
Merged
diegosouzapw merged 6 commits into
diegosouzapw merged 6 commits into
Conversation
Keep model-aware applicable Claude resets and the tip predictive-warning guard. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
diegosouzapw
merged commit Oct 7, 2026
ca46467
into
cheaper-inference:release/v3.8.52
7 of 9 checks passed
diegosouzapw
added a commit
that referenced
this pull request
Oct 7, 2026
Records the Onda B quality drift on the post-squash tip `9214916a`. Product squashes do not carry the baseline.
File-size ceilings inside `frozen`, measured with `split("\n").length`:
- `browser-worker.ts` 4398 → 4467 (#15615)
- `EndpointPageClient.tsx` 2493 → 2531 (#15565)
- `SystemStorageTab.tsx` 1611 → 1619 (#15565)
- `imageGeneration.ts` 3346 → 3377 (#15423, #15513)
- `catalog.ts` 2127 → 2130 (#15701)
- `auth.ts` 3666 → 3668 (#15624)
`node scripts/check/check-file-size.mjs` passed. The legacy string map was not edited.
⚠️ base-red inherited: #15306
This was referenced Oct 18, 2026
Merged
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
Claude OAuth accounts at 91–93% weekly usage can report active critical limits while inference is still allowed. Cached quota selection interpreted this warning as exhaustion and rejected every request before an upstream attempt. Preserve eligibility whenever the window reports positive remaining quota, while retaining configured operator cutoffs and explicit upstream 429 handling.
When quota really is exhausted, report the latest applicable blocking reset for each account, then the earliest of those account recovery times. Exclude unrelated model windows and sessions with recovery enabled. This prevents synthetic five-minute retry messages and premature resets when several windows block the same request.
Related Issues
Validation
node --import tsx/esm --test tests/unit/claude-scoped-quota-auth.test.ts tests/unit/claude-quota-normalization.test.ts tests/unit/claude-fable-usage.test.ts— 37 passed.DISABLE_SQLITE_AUTO_BACKUP=true node --import tsx/esm --import ./open-sse/utils/setupPolyfill.ts --import ./tests/_setup/isolateDataDir.ts --test --test-force-exit tests/integration/claude-quota-chat-ordering.test.ts— 7 passed, including explicit upstream 429 cooldown precedence.npm run typecheck:corenpm run check:file-size -- --base-ref origin/release/v3.8.52— passed after reducing the changed auth block.npm run lint— passed.release/v3.8.52at23a1148486.open-sse/services/combo/autoStrategy.ts:519; this PR does not touch that file.Tests Added Or Updated
tests/unit/claude-scoped-quota-auth.test.tsCoverage Notes
The five added cases cover both observed weekly warning percentages, configured percentage cutoffs, scoped warning versus actual exhaustion, the latest applicable reset on an account, unrelated model windows, recovery-enabled sessions, and the earliest recovery across accounts. Existing tests continue covering missing percentage telemetry and explicit upstream rejections.
Reviewer Notes
No migrations, feature flags, credentials, or deployment customizations. The explicit upstream 429 classifier is unchanged. Production validation: the predeployment
/v1/messagesprobe returned the exact cached HTTP 429 with no selected account. After deploying the fix on the existing 3.8.52 fork build, both JSON and SSE probes forclaude-opus-5-5returned HTTP 200 andOK. The JSON probe used 41 input / 4 output tokens. Both accounts were then refreshed through the authenticated usage endpoint: their active critical weekly windows still reported 7% and 9% remaining, and repeated JSON/SSE requests succeeded. The isolated image health check and all 61 production regression tests (including existing Codex paid-credit and rotation behavior) passed. Database/configuration backups and image-only rollback were prepared; no schema changes were required.