mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 02:20:22 +00:00
fix(failover): treat stop reason error as timeout
This commit is contained in:
@@ -751,6 +751,17 @@ describe("runWithModelFallback", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("falls back on abort errors with reason: error", async () => {
|
||||
await expectFallsBackToHaiku({
|
||||
provider: "openai",
|
||||
model: "gpt-4.1-mini",
|
||||
firstError: Object.assign(new Error("aborted"), {
|
||||
name: "AbortError",
|
||||
reason: "reason: error",
|
||||
}),
|
||||
});
|
||||
});
|
||||
|
||||
it("falls back when message says aborted but error is a timeout", async () => {
|
||||
await expectFallsBackToHaiku({
|
||||
provider: "openai",
|
||||
|
||||
Reference in New Issue
Block a user