diff --git a/apps/viewer/src/pages/api/integrations/openai/streamer.ts b/apps/viewer/src/pages/api/integrations/openai/streamer.ts index dc2c18953..99f8a913e 100644 --- a/apps/viewer/src/pages/api/integrations/openai/streamer.ts +++ b/apps/viewer/src/pages/api/integrations/openai/streamer.ts @@ -66,6 +66,8 @@ const handler = async (req: Request) => { messages ) + if (!stream) return new Response('Missing credentials', { status: 400 }) + return new Response(stream, { status: 200, headers: {