Repository navigation
Description
Summary
When a combo target rejects a request with HTTP 413 (payload / request too large for that target), the combo traversal treats the refusal as a terminal verdict for the whole request instead of hopping to the next untried target. The same failure also gets cooldown scope "none", so the refusing provider is not cooled and stays eligible to kill the next request the same way.
Affected versions
- 2.99.0
- 2.100.6 (current)
What happens
In src/combos/failover.ts:
comboFailureCooldownScopereads status 413 as a request-shape refusal and returns"none"(the target is healthy; the request simply did not fit it).- But
decideComboFailurehas no hop arm for it: status 413 is not in the hop status list, and once the failure is classified it lands in the genericinvalid_request_errorstop (or the final fallthrough), so the traversal ends even when untried combo targets remain.
Other "this target cannot take this request" verdicts in the same function already hop — e.g. input_admission_refused, per-target context overflow, and the response-format capability refusal. A bare provider 413 is the exception that stayed a stop.
Evidence (aggregate, one production proxy, ~46 minutes on 2.100.6)
- 232 combo requests in the window: 65 ended 200, 167 ended 400.
- All 167 errors carry
failureCause = payload-rejected, and all 167 contain agroqattempt (openai/gpt-oss-120b) that returned 413. - Continuations of the chain after a 413: 0 of 167. Chains that had been hopping across 429s died the moment the rotation reached the 413.
- Context of the window: the primary account was at its quota cap (429 / hard block) and other targets were returning 429, so rotations reached the 413 target often. In a quieter regime fewer chains rotate that far, but any chain that reaches a target with a smaller intake limit dies the same way: the mechanism is in the decision code, not the regime.
By contrast, 429-class failures hop as expected: in the same window, 46 chains with failures were rescued by successive hops and completed with 200, with no error surfaced to the caller.
Expected behavior
A 413 / request_too_large refusal is target-local evidence — "this target cannot take a request this large" — not a verdict on the request itself. The payload does not change between targets, and a later combo target with a larger intake limit may accept it as-is. The combo should hop to the next untried target and only surface an error when no alternative remains, the same way it already treats per-target context overflow.
Request
Decide "hop" for this error class in decideComboFailure (status 413, and the structured request_too_large code), keeping the cooldown scope at "none" as it already is. Traversal is already finite (each candidate is tried once via the tried set and attempted targets are excluded from the pick), so the hop always advances and cannot loop on the refusing target within a request.
Related prior work in the same area: #7892 (hop on per-target context-length 400), #4150 (classification of a hopping 413 after the combo exhausts). Neither covers a bare provider 413 reaching the combo failure decision.
A local one-condition patch adding exactly this hop arm to decideComboFailure is applied on a 2.100.6 install here: the decision change is verified against the installed code (413 and request_too_large now decide "hop"; every control case — generic invalid_request_error 400, 499, 429, 5xx, 401 — decides exactly as before), and the patched proxy is live and healthy.
Activity
github-actions commentedon Nov 20, 2026
Issue closed: use an issue template
Thanks for taking the time to submit this issue. It was closed automatically because it was not opened with a recognized issue template (Bug report, Feature request, Documentation, or Provider compatibility). Freeform and API-opened issues cannot skip this check.
Please edit the issue to add:
See the Contributing guide for details.
Once the report passes the automated checks, it will be reopened automatically unless a maintainer has changed its state.