From f72199dee2f8d0d15f3a54e0ae702141aa8a6854 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Thu, 16 Oct 2025 12:27:38 +0530 Subject: [PATCH] use streamsse in vertexai --- core/llm/llms/VertexAI.ts | 4 ++-- packages/openai-adapters/src/apis/Gemini.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/llm/llms/VertexAI.ts b/core/llm/llms/VertexAI.ts index 258bccc3d..216ed03cb 100644 --- a/core/llm/llms/VertexAI.ts +++ b/core/llm/llms/VertexAI.ts @@ -1,6 +1,6 @@ import { AuthClient, GoogleAuth, JWT, auth } from "google-auth-library"; -import { streamResponse, streamSse } from "@continuedev/fetch"; +import { streamSse } from "@continuedev/fetch"; import { ChatMessage, CompletionOptions, LLMOptions } from "../../index.js"; import { renderChatMessage, stripImages } from "../../util/messageContent.js"; import { BaseLLM } from "../index.js"; @@ -287,7 +287,7 @@ class VertexAI extends BaseLLM { body: JSON.stringify(body), signal, }); - yield* this.geminiInstance.processGeminiResponse(streamResponse(response)); + yield* this.geminiInstance.processGeminiResponse(streamSse(response)); } private async *streamChatBison( diff --git a/packages/openai-adapters/src/apis/Gemini.ts b/packages/openai-adapters/src/apis/Gemini.ts index 9c07b957b..734c32e86 100644 --- a/packages/openai-adapters/src/apis/Gemini.ts +++ b/packages/openai-adapters/src/apis/Gemini.ts @@ -1,4 +1,4 @@ -import { streamResponse } from "@continuedev/fetch"; +import { streamSse } from "@continuedev/fetch"; import { OpenAI } from "openai/index"; import { ChatCompletion, @@ -286,7 +286,7 @@ export class GeminiApi implements BaseLlmApi { async *handleStreamResponse(response: any, model: string) { let buffer = ""; let usage: UsageInfo | undefined = undefined; - for await (const chunk of streamResponse(response as any)) { + for await (const chunk of streamSse(response as any)) { buffer += chunk; const parts = buffer.split("\n,");