fix(agents): classify 'upstream request failed' as server_error for failover#95521
fix(agents): classify 'upstream request failed' as server_error for failover#95521wings1029 wants to merge 1 commit into
Conversation
…ailover Provider errors with message 'Upstream request failed' (error type upstream_error) were not matched by the existing 'upstream error' or 'upstream connect error' patterns, causing them to fall through to unclassified and preventing model fallback from triggering. Add 'upstream request failed' to the server error message patterns so the failover engine correctly classifies it as a transient server error and advances to the next configured fallback model. Fixes openclaw#95519 Co-Authored-By: Claude <[email protected]>
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close: this one-line matcher is superseded by #95542, which is open, mergeable, proof-sufficient, and covers both structured upstream_error normalization and the embedded result-payload fallback boundary that this PR still misses. Canonical path: Close this partial branch and let maintainers review or land #95542 as the canonical fix for the upstream_error fallback cluster. So I’m closing this here and keeping the remaining discussion on #95542. Review detailsBest possible solution: Close this partial branch and let maintainers review or land #95542 as the canonical fix for the upstream_error fallback cluster. Do we have a high-confidence way to reproduce the issue? Yes at source level: current main joins embedded error payload text, filters it through an auth/auth_permanent/billing-only helper, and treats a null result classification as a completed candidate rather than fallback-worthy failure. Is this the best way to solve the issue? No. The matcher addition is useful but too narrow; the best fix must also classify the embedded provider payload boundary, which #95542 does with focused tests and proof. Security review: Security review cleared: The diff only adds one internal matcher string and does not touch dependencies, workflows, secrets, package metadata, or code execution surfaces. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against c6386178973d. |
|
Complementary observations on top of ClawSweeper's review: This PR adds the single string
|
|
ClawSweeper applied the proposed close for this PR.
|
Summary
Provider errors with message
Upstream request failed(error typeupstream_error) were not matched by the existingupstream errororupstream connect errorpatterns, causing them to fall through tounclassifiedand preventing model fallback from triggering.Add
upstream request failedto the server error message patterns.Fixes #95519.
Change
failover-matches.ts: add"upstream request failed"to theserverErrorpattern list alongside existing"upstream error"and"upstream connect error"entries.Tests and validation
failover-matches.test.tsRisk
🤖 Generated with Claude Code