diff --git a/open-sse/handlers/responsesHandler.ts b/open-sse/handlers/responsesHandler.ts index d0a55241c1..e05b264ac3 100644 --- a/open-sse/handlers/responsesHandler.ts +++ b/open-sse/handlers/responsesHandler.ts @@ -63,6 +63,7 @@ export async function handleResponsesCore({ connectionId, userAgent: null, comboName: null, + onStreamFailure: null, }); // handleChatCore's union includes a bare Response (early returns that never diff --git a/tests/unit/responses-handler.test.ts b/tests/unit/responses-handler.test.ts index fee20b5588..a22542f29f 100644 --- a/tests/unit/responses-handler.test.ts +++ b/tests/unit/responses-handler.test.ts @@ -367,8 +367,8 @@ test("handleResponsesCore transforms Command Code executor SSE through Responses assert.match(sse, /data: \[DONE\]/); }); -test("handleResponsesCore propagates upstream failures from chatCore unchanged", async () => { - const { result } = await invokeResponsesCore({ +test("handleResponsesCore propagates upstream failures without retrying", async () => { + const { result, calls } = await invokeResponsesCore({ body: { model: "gpt-4o-mini", input: "hello", @@ -382,6 +382,7 @@ test("handleResponsesCore propagates upstream failures from chatCore unchanged", assert.equal(result.success, false); assert.equal(result.status, 401); + assert.equal(calls.length, 1); const payload = (await result.response.json()) as ErrorPayload; assert.equal(payload.error.message, "[401]: unauthorized");