test: add missing ENETRESET test case

This commit is contained in:
Ayane
2026-02-17 18:17:09 +08:00
committed by Peter Steinberger
parent 76ed274aad
commit 5b562e96cb

View File

@@ -787,6 +787,14 @@ describe("runWithModelFallback", () => {
});
});
it("falls back on ENETRESET (connection reset by network)", async () => {
await expectFallsBackToHaiku({
provider: "openai",
model: "gpt-4.1-mini",
firstError: Object.assign(new Error("connect ENETRESET"), { code: "ENETRESET" }),
});
});
it("falls back on provider abort errors with request-aborted messages", async () => {
await expectFallsBackToHaiku({
provider: "openai",