Skip to content

Cherry-pick 92648f9ba: broaden 402 temporary-limit detection#1252

Merged
alexey-pelykh merged 1 commit intomainfrom
cherry-pick/92648f9ba-broaden-402-detection
Mar 14, 2026
Merged

Cherry-pick 92648f9ba: broaden 402 temporary-limit detection#1252
alexey-pelykh merged 1 commit intomainfrom
cherry-pick/92648f9ba-broaden-402-detection

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Cherry-pick from upstream

Broadens 402 payment-required error classification to better distinguish temporary usage limits (rate_limit) from permanent billing errors. Adds structured 402 message parsing with explicit billing signals, retryable transient signals, and periodic limit detection.

Discarded (gutted in fork): CHANGELOG.md, model-fallback.ts, model-fallback.probe.test.ts, failover-error.test.ts, pi-embedded-helpers tests, pi-embedded-runner/run.ts, classifyFailoverReasonFromHttpStatus (model-fallback layer).

Part of #899.

…cooldown probe (openclaw#38533)

Cherry-picked from openclaw/openclaw@92648f9ba (AUTO-PARTIAL).
Discarded gutted files: CHANGELOG.md, model-fallback.ts, model-fallback.probe.test.ts,
failover-error.test.ts, pi-embedded-helpers.isbillingerrormessage.test.ts,
pi-embedded-runner/run.ts. Kept classifyFailoverReasonFrom402Text addition
in classifyFailoverReason; discarded classifyFailoverReasonFromHttpStatus
(gutted model-fallback layer) and isPeriodicUsageLimitErrorMessage references
(function does not exist in fork).

Co-authored-by: xialonglee <[email protected]>
Co-authored-by: altaywtf <[email protected]>
@alexey-pelykh alexey-pelykh merged commit f57bb47 into main Mar 14, 2026
7 checks passed
@alexey-pelykh alexey-pelykh deleted the cherry-pick/92648f9ba-broaden-402-detection branch March 14, 2026 00:13
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.

2 participants