fix(openai): accept missing content-type on ChatGPT Responses SSE stream

This commit is contained in:
clawsweeper
2026-06-05 04:00:02 +00:00
parent 494c01cd97
commit ecc88e19f9

View File

@@ -300,7 +300,12 @@ describe("buildGuardedModelFetch", () => {
);
expect(response.headers.get("content-type")).toContain("text/event-stream");
await expect(response.text()).resolves.toContain("response.created");
const items = [];
for await (const item of Stream.fromSSEResponse(response, new AbortController())) {
items.push(item);
}
expect(items).toEqual([{ ok: true }]);
expect(release).toHaveBeenCalledTimes(1);
});