mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:11:36 +00:00
fix(agents): handle overloaded failover separately (#38301)
* fix(agents): skip auth-profile failure on overload * fix(agents): note overload auth-profile fallback fix * fix(agents): classify overloaded failures separately * fix(agents): back off before overload failover * fix(agents): tighten overload probe and backoff state * fix(agents): persist overloaded cooldown across runs * fix(agents): tighten overloaded status handling * test(agents): add overload regression coverage * fix(agents): restore runner imports after rebase * test(agents): add overload fallback integration coverage * fix(agents): harden overloaded failover abort handling * test(agents): tighten overload classifier coverage * test(agents): cover all-overloaded fallback exhaustion * fix(cron): retry overloaded fallback summaries * fix(cron): treat HTTP 529 as overloaded retry
This commit is contained in:
@@ -311,7 +311,7 @@ export async function runAgentTurnWithFallback(params: {
|
||||
model,
|
||||
runId,
|
||||
authProfile,
|
||||
allowRateLimitCooldownProbe: runOptions?.allowRateLimitCooldownProbe,
|
||||
allowTransientCooldownProbe: runOptions?.allowTransientCooldownProbe,
|
||||
});
|
||||
return (async () => {
|
||||
const result = await runEmbeddedPiAgent({
|
||||
|
||||
@@ -487,7 +487,7 @@ export async function runMemoryFlushIfNeeded(params: {
|
||||
model,
|
||||
runId: flushRunId,
|
||||
authProfile,
|
||||
allowRateLimitCooldownProbe: runOptions?.allowRateLimitCooldownProbe,
|
||||
allowTransientCooldownProbe: runOptions?.allowTransientCooldownProbe,
|
||||
});
|
||||
const result = await runEmbeddedPiAgent({
|
||||
...embeddedContext,
|
||||
|
||||
@@ -166,7 +166,7 @@ export function buildEmbeddedRunBaseParams(params: {
|
||||
model: string;
|
||||
runId: string;
|
||||
authProfile: ReturnType<typeof resolveProviderScopedAuthProfile>;
|
||||
allowRateLimitCooldownProbe?: boolean;
|
||||
allowTransientCooldownProbe?: boolean;
|
||||
}) {
|
||||
return {
|
||||
sessionFile: params.run.sessionFile,
|
||||
@@ -187,7 +187,7 @@ export function buildEmbeddedRunBaseParams(params: {
|
||||
bashElevated: params.run.bashElevated,
|
||||
timeoutMs: params.run.timeoutMs,
|
||||
runId: params.runId,
|
||||
allowRateLimitCooldownProbe: params.allowRateLimitCooldownProbe,
|
||||
allowTransientCooldownProbe: params.allowTransientCooldownProbe,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1054,6 +1054,11 @@ describe("runReplyAgent typing (heartbeat)", () => {
|
||||
reportedReason: "rate_limit",
|
||||
expectedReason: "rate limit",
|
||||
},
|
||||
{
|
||||
existingReason: undefined,
|
||||
reportedReason: "overloaded",
|
||||
expectedReason: "overloaded",
|
||||
},
|
||||
{
|
||||
existingReason: "rate limit",
|
||||
reportedReason: "timeout",
|
||||
|
||||
@@ -208,7 +208,7 @@ export function createFollowupRunner(params: {
|
||||
bashElevated: queued.run.bashElevated,
|
||||
timeoutMs: queued.run.timeoutMs,
|
||||
runId,
|
||||
allowRateLimitCooldownProbe: runOptions?.allowRateLimitCooldownProbe,
|
||||
allowTransientCooldownProbe: runOptions?.allowTransientCooldownProbe,
|
||||
blockReplyBreak: queued.run.blockReplyBreak,
|
||||
bootstrapPromptWarningSignaturesSeen,
|
||||
bootstrapPromptWarningSignature:
|
||||
|
||||
Reference in New Issue
Block a user