Skip to content

fix(providers): do not treat a Claude weekly warning as exhaustion - #15361

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
HouMinXi:fix/claude-weekly-warning
Oct 6, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
HouMinXi:fix/claude-weekly-warning

Conversation

@HouMinXi

@HouMinXi HouMinXi commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • OmniRoute treated Anthropic's predictive weekly-usage warning as proof that the Claude account was already exhausted. A Claude Max account at 92 percent used, with the session at 3 percent, was skipped and the caller was told to wait.
  • The preflight skip and the real 429 classification shared one predicate. The preflight now skips an account only when the active critical window reports no quota remaining. A later real 429 still classifies from the same active and critical metadata.
  • The reset time announced for a skipped Claude account is the window's own reset, not the capped value that turned a weekly reset into "reset after 5m".

Related Issues

Validation

  • Change type: other (Claude quota preflight)
  • Focused tests: node --import tsx/esm --test tests/unit/claude-scoped-quota-auth.test.ts (15 pass)
  • eslint on the changed files, with the repo suppression file
  • Reconciled with release/v3.8.52 @ 23a1148486
  • Updated test covers the change
  • Defect injection: dropping the preflight predicate makes the new assertion fail with true !== false, and the change was restored

Tests Added Or Updated

  • tests/unit/claude-scoped-quota-auth.test.ts (updated)

Coverage Notes

  • The new case feeds a weekly window at 92 percent used and asserts the account is not skipped, then feeds the same window at 100 percent and asserts it is still blocked.

Reviewer Notes

  • isBlockingClaudeQuota is unchanged and still drives the real 429 path. Only isQuotaExhaustedForRequest and the preflight reset use the new predicate.

A predictive weekly window that is active and critical but still reports
quota remaining was classified as exhausted, so a Claude account at 92
percent used was skipped and the caller was told to wait. The real 429
path keeps using the active and critical metadata. Only the preflight
skip now requires the window to report no quota left, and the reset it
announces is the window's own reset time.

Signed-off-by: Minxi Hou <houminxi@gmail.com>
@HouMinXi
HouMinXi requested a review from diegosouzapw as a code owner October 2, 2026 16:19
@diegosouzapw
diegosouzapw merged commit 0256b3d into diegosouzapw:release/v3.8.52 Oct 6, 2026
42 of 51 checks passed
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.

fix(claude): Claude predictive weekly warning is treated as exhausted at 92% usage

2 participants