test: add missing ENETRESET test case

This commit is contained in:
Ayane
2026-03-02 02:08:27 +00:00
committed by Peter Steinberger
parent 76ed274aad
commit 5b562e96cb
+8
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",