imbytecat 5af05b2141 feat: stream gpt-image generation via SSE with keepalive
- /api/generate now responds with text/event-stream end-to-end
- forwards upstream image_generation.* / image_edit.* partial+completed events
- 20s keepalive comments survive Cloudflare's 120s proxy-read timeout
- falls back to non-streaming when upstream rejects stream/partial_images
- drops @ai-sdk/openai-compatible, @ai-sdk/react, ai (unused)
- frontend consumes SSE via fetch+ReadableStream, shows progressive preview
2026-05-18 22:44:31 +08:00
2026-05-18 21:50:41 +08:00
2026-05-18 21:50:41 +08:00
2026-05-18 21:50:41 +08:00
2026-05-18 21:50:41 +08:00

ai-playground

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.3.13. Bun is a fast all-in-one JavaScript runtime.

S
Description
No description provided
Readme 92 KiB
Languages
TypeScript 66.2%
HTML 33.8%