mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
fix(auto-reply): keep typed overloaded failures on the surfaced-copy path
Shipped behavior pins overloaded FailoverErrors to immediate dedicated copy (agent-runner-execution.test.ts 'surfaces typed overloaded failures'); only timeout and server_error reasons join the transient retry gate.
This commit is contained in:
@@ -7867,10 +7867,6 @@ describe("runAgentTurnWithFallback", () => {
|
||||
reason: "timeout" as const,
|
||||
message: "provider request timed out without status token",
|
||||
},
|
||||
{
|
||||
reason: "overloaded" as const,
|
||||
message: "provider capacity exhausted briefly",
|
||||
},
|
||||
])(
|
||||
"retries once for structured FailoverError $reason without leading HTTP status text",
|
||||
async ({ reason, message }) => {
|
||||
|
||||
@@ -3084,12 +3084,11 @@ async function runAgentTurnWithFallbackInternal(
|
||||
!shouldSurfaceToControlUi
|
||||
? classifyProviderRequestError(err)
|
||||
: undefined;
|
||||
// Typed overloaded failures stay out of the transient retry: they surface
|
||||
// dedicated overloaded copy immediately instead of being retried silently.
|
||||
const isTransientHttp =
|
||||
isTransientHttpError(message) ||
|
||||
(isFailoverError(err) &&
|
||||
(err.reason === "timeout" ||
|
||||
err.reason === "server_error" ||
|
||||
err.reason === "overloaded"));
|
||||
(isFailoverError(err) && (err.reason === "timeout" || err.reason === "server_error"));
|
||||
|
||||
// Drain/restart aborts stay silent and defer to post-restart
|
||||
// main-session recovery, which resumes the interrupted turn (or emits its
|
||||
|
||||
Reference in New Issue
Block a user