From 779b3e4c1cede6845672381e4773b77097f203f6 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 16 Oct 2025 10:47:05 +0530 Subject: [PATCH] fix: use streamsse for streaming chat in gemini --- core/llm/llms/Gemini.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/llm/llms/Gemini.ts b/core/llm/llms/Gemini.ts index 7caf2db7d..7f704b38b 100644 --- a/core/llm/llms/Gemini.ts +++ b/core/llm/llms/Gemini.ts @@ -1,4 +1,4 @@ -import { streamResponse } from "@continuedev/fetch"; +import { streamSse } from "@continuedev/fetch"; import { v4 as uuidv4 } from "uuid"; import { AssistantChatMessage, @@ -414,10 +414,9 @@ class Gemini extends BaseLLM { body: JSON.stringify(body), signal, }); - for await (const message of this.processGeminiResponse( - streamResponse(response), - )) { - yield message; + + for await (const chunk of streamSse(response)) { + yield chunk; } } private async *streamChatBison(