From 84a2cedf187c7a30eb4a9ae0392e901001029e36 Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Wed, 3 Dec 2025 15:06:55 -0800 Subject: [PATCH] app: relay thinking false to server (#13319) This fixes a bug where disabling thinking on deepseek-v3.1 did not stop the model from thinking. When thinking is not defined it should not be sent to the server since this will cause error responses in some cases where the model does not support thinking. However if it is defined as false it should still be sent. --- app/ui/app/src/api.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/ui/app/src/api.ts b/app/ui/app/src/api.ts index a06e4e00..a701a30a 100644 --- a/app/ui/app/src/api.ts +++ b/app/ui/app/src/api.ts @@ -204,12 +204,10 @@ export async function* sendMessage( data: uint8ArrayToBase64(att.data), })); - // Only send think parameter when actually requesting thinking - // Don't send false as it causes issues with some providers + // Send think parameter when it's explicitly set (true, false, or a non-empty string). const shouldSendThink = think !== undefined && - ((typeof think === "boolean" && think) || - (typeof think === "string" && think !== "")); + (typeof think === "boolean" || (typeof think === "string" && think !== "")); const response = await fetch(`${API_BASE}/api/v1/chat/${chatId}`, { method: "POST",