Skip to content

[WRONG BRANCH] fix(anthropic-pool): an allowed-status 429 fails the request over again, still cooling nothing (.20) - #18

Merged
vadymhimself merged 1 commit into
release/2.65.0-vadymhimself.15from
devops-r/allowed-429-failover
Nov 11, 2026
Merged

vadymhimself merged 1 commit into
release/2.65.0-vadymhimself.15from
devops-r/allowed-429-failover

Conversation

@vadymhimself

Copy link
Copy Markdown
Owner

What

This fixes a 429 whose anthropic-ratelimit-unified-status is allowed, meaning the account still has quota and upstream refused the request itself.

The change is in rotateAnthropicAccountOn429: failover no longer requires limited, and the cooldown write runs only when limited. The version is bumped to 2.65.0-vadymhimself.20.

Known ceiling (marked ponytail: in the code): there is no per-request record of which accounts were tried. So a refusal that every account repeats can alternate accounts up to ANTHROPIC_POOL_MAX_FAILOVERS_PER_REQUEST (16) times before the 429 returns. Refused calls bill no tokens.

Tests

  • The changed test in tests/adapters/anthropic/anthropic-ratelimit-headers.test.ts, "an allowed unified status fails the request over without cooling either account", checks that both allowed 429s return the other account, that both accounts have no health entry, that two ; failing over to lines are logged, and that the header-less 429 still cools.
  • Negative control: the same test on the .19 source (aef6e32) gives 0 pass, 1 fail.
  • The affected fork tests on this branch all pass: 9 files, 324 pass, 0 fail, run through the lane (devops-r-ocx20-allowed429). The files are account-pool, ratelimit-headers, terminal-continuation-owner-rotation, claude-messages-endpoint, generic-oauth-failover, always-on-429-failover, anthropic-quorum-cache, agentradar-account-pin-e2e and terminal-guard-server.
  • Downstream, paperclip fix(codex): keep valid Daybreak grants with malformed sibling metadata lidge-jun/opencodex#5907's images/ocx/failover.check.ts:188 (a short allowed 429 on account A fails over to J and returns 200) was RED on .19 and is expected GREEN once fix(codex): keep valid Daybreak grants with malformed sibling metadata lidge-jun/opencodex#5907 is re-pinned to .20.

Base: release/2.65.0-vadymhimself.15, the fork release branch. Tag v2.65.0-vadymhimself.20 on the merge commit after its push CI is green.

🤖 Generated with Claude Code

…in, still cooling nothing (.20)

#15 stopped cooling on a 429 whose unified status says "allowed". That was right, because such a 429 is a refusal of the request's shape and cooling on it benched every client on the account. But it also stopped the failover, so the 429 went back to the caller. A combo then moves to its next provider and model, which loses more cache than an account switch. 3f6b2f3 had fixed exactly that bounce.

The allowed 429 now moves this request to another account and cools no account. Rejected and header-less 429s cool and fail over as before. Pinned requests still never switch. Known ceiling: when every account repeats the refusal, the request can alternate accounts up to ANTHROPIC_POOL_MAX_FAILOVERS_PER_REQUEST times before the 429 returns. Refused calls bill no tokens.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Nov 11, 2026
@github-actions github-actions Bot changed the title fix(anthropic-pool): an allowed-status 429 fails the request over again, still cooling nothing (.20) [WRONG BRANCH] fix(anthropic-pool): an allowed-status 429 fails the request over again, still cooling nothing (.20) Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (release/2.65.0-vadymhimself.15); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required enforce-target check will keep failing until every issue above is resolved.

@github-actions
github-actions Bot marked this pull request as draft November 11, 2026 01:28
@vadymhimself
vadymhimself marked this pull request as ready for review November 11, 2026 02:35
@vadymhimself
vadymhimself merged commit fa113ad into release/2.65.0-vadymhimself.15 Nov 11, 2026
32 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant