test (agents): cover empty-chunk timeout failover behavior

This commit is contained in:
Vignesh Natarajan
2026-02-14 18:53:37 -08:00
parent 6c0dca30b8
commit 79aaab403c
3 changed files with 60 additions and 0 deletions

View File

@@ -108,4 +108,9 @@ describe("formatAssistantErrorText", () => {
const msg = makeAssistantError("429 rate limit reached");
expect(formatAssistantErrorText(msg)).toContain("rate limit reached");
});
it("returns a friendly message for empty stream chunk errors", () => {
const msg = makeAssistantError("request ended without sending any chunks");
expect(formatAssistantErrorText(msg)).toBe("LLM request timed out.");
});
});