From 5337f5e41dbc21b5e662e4a1e71ac11868a7ba46 Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Fri, 17 Oct 2025 10:58:11 +0530 Subject: [PATCH] fix: drop thinking messages without signature --- gui/src/redux/util/constructMessages.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gui/src/redux/util/constructMessages.ts b/gui/src/redux/util/constructMessages.ts index 71d461ed774..2725461c8ba 100644 --- a/gui/src/redux/util/constructMessages.ts +++ b/gui/src/redux/util/constructMessages.ts @@ -97,10 +97,13 @@ export function constructMessages( }, }); } else if (item.message.role === "thinking") { - msgs.push({ - ctxItems: item.contextItems, - message: item.message, - }); + // Only include thinking messages that are complete (either regular thinking with signature or if it is redacted thinking) + if (item.message.signature || item.message.redactedThinking) { + msgs.push({ + ctxItems: item.contextItems, + message: item.message, + }); + } } else if (item.message.role === "assistant") { // When using system message tools, convert tool calls/states to text content if (item.toolCallStates?.length && useSystemToolsFramework) {