mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
fix(openai): accept missing content-type on ChatGPT Responses SSE stream
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user