From 9ac80030df39d0ed06f759700398db231c262651 Mon Sep 17 00:00:00 2001 From: mic Date: Mon, 8 Dec 2025 16:33:58 +0100 Subject: [PATCH] fixing OpenRouter first line. see #550 --- js/workers/model-worker-openai_comp.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/workers/model-worker-openai_comp.js b/js/workers/model-worker-openai_comp.js index 68398131..9e9ccaeb 100644 --- a/js/workers/model-worker-openai_comp.js +++ b/js/workers/model-worker-openai_comp.js @@ -107,6 +107,7 @@ self.onmessage = async function(event) { try{ parsedLines = lines .map((line) => line.replace(/^data: /, "").trim()) // Remove the "data: " prefix + .map((line) => line.replace(/^: OPENROUTER PROCESSING/, "").trim()) // Remove the ": OPENROUTER PROCESSING " prefix .filter((line) => line !== "" && line !== "[DONE]") // Remove empty lines and "[DONE]" // .map((line) => JSON.parse(line)); // Parse the JSON string .map((line) => {