mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-05 00:03:08 +00:00
Addresses review finding #4 on #8933. Before: getOpenAIResponsesCompletionStream was an `async function*` (async generator). Calling an async generator returns an iterator synchronously and never throws — the generator body only runs when the caller starts iterating. So the try/catch around the call site in lib.ts (which is supposed to fall back to the Completions API on failure) never caught anything, and any setup error (dynamic SDK import, getOpenaiClient, responses.stream initial request) surfaced as a rejection on the first chunk read in the consumer rather than as a fallback trigger. After: getOpenAIResponsesCompletionStream is a regular `async function` that performs the setup (await the client, construct the stream request) in its body, then returns an inner async iterable for the streaming loop. The caller in lib.ts now awaits it, so setup failures are caught by the existing try/catch and the Completions API fallback fires as intended. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Windmill frontend
The Windmill frontend written in Svelte 5 + Tailwind CSS
The frontend is under AGPL, see the LICENSE file at the root of this repo