From 1bb8d6e1e0db71ef0c8f1efdf58ee243f40eb43f Mon Sep 17 00:00:00 2001 From: Pavel Frankov Date: Fri, 6 Dec 2024 00:22:50 +0300 Subject: [PATCH] Fixed issue with parsing OpenRouter's requests. --- src/providers/openai-compatible.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/providers/openai-compatible.ts b/src/providers/openai-compatible.ts index 244d398..b4c6367 100644 --- a/src/providers/openai-compatible.ts +++ b/src/providers/openai-compatible.ts @@ -136,6 +136,9 @@ export class OpenAICompatibleAIProvider implements AIProvider { if (message === "[DONE]") { break; } + if (line.startsWith(":")) { + continue; + } try { const parsed = JSON.parse(message); combined +=