From b179dc264739d5d6d8a16f5483b24b0464c63a6d Mon Sep 17 00:00:00 2001 From: decolua Date: Tue, 10 Feb 2026 19:29:43 +0700 Subject: [PATCH] Refactor AntigravityExecutor to improve part filtering logic --- open-sse/executors/antigravity.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/open-sse/executors/antigravity.js b/open-sse/executors/antigravity.js index ce6b80c8..1e0c1fad 100644 --- a/open-sse/executors/antigravity.js +++ b/open-sse/executors/antigravity.js @@ -36,8 +36,12 @@ export class AntigravityExecutor extends BaseExecutor { if (c.parts?.some(p => p.functionResponse)) { role = "user"; } - // Strip thought parts (no valid signature → provider rejects) - const parts = c.parts?.filter(p => !p.thought && !p.thoughtSignature); + // Strip thought-only parts, keep thoughtSignature on functionCall parts (Gemini 3+ requires it) + const parts = c.parts?.filter(p => { + if (p.thought && !p.functionCall) return false; + if (p.thoughtSignature && !p.functionCall && !p.text) return false; + return true; + }); if (role !== c.role || parts?.length !== c.parts?.length) { return { ...c, role, parts }; }