483fa8df3c
When the proxy SSE stream ends without sending a done or error terminal event, streamProxy now throws an error instead of silently calling stream.end() with no arguments. The thrown error is caught by the existing catch block, which pushes an error event with stopReason='error' and resolves finalResultPromise. Previously, server disconnects produced a silent success: the stream iterator completed normally with stopReason='stop' (the default) and empty content, and finalResultPromise never resolved, causing callers that awaited stream.result() to hang indefinitely. This matches the pattern used by the codex provider (openai-codex-responses.ts) which already guards against missing terminal events.