From 568a9a9342c040517a63fe33a5b7b886872ffb0d Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Sun, 1 Feb 2026 16:24:03 -0800 Subject: [PATCH] Refactor: remove dot fallback for empty messages --- src/streaming.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/streaming.js b/src/streaming.js index 593635f..4a53077 100644 --- a/src/streaming.js +++ b/src/streaming.js @@ -20,11 +20,6 @@ export const buildBody=()=>{ // Filter out empty text parts which cause 400 errors on strict providers like Moonshot content = content.filter(p => p.type !== 'text' || (p.text && p.text.trim().length > 0)); - // Ensure every message has at least some text content if it's otherwise empty (e.g. multimodal only) - if (content.length === 0 || !content.some(p => p.type === 'text')) { - content.push({type: 'text', text: '.'}); - } - msgs.push({ role: m.role, content: content,