From bd30ee1fabd41017140b236833659a291754c2fc Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Thu, 21 May 2026 21:26:37 -0400 Subject: [PATCH] chat: disable Qwen3 thinking via chat_template_kwargs (8x faster) --- public/src/chat.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/public/src/chat.js b/public/src/chat.js index 29634c7..d5a88e6 100644 --- a/public/src/chat.js +++ b/public/src/chat.js @@ -145,6 +145,11 @@ export async function* sendMessage(message) { temperature: 0.5, max_tokens: finalAvailable, stream: true, + // Disable Qwen3 reasoning: vLLM/llama.cpp honor chat_template_kwargs; + // options.think is Ollama-flavored fallback. Reasoning roughly 8x slower. + chat_template_kwargs: { + enable_thinking: false, + }, options: { ...apiConfig.defaultOptions, } @@ -324,7 +329,12 @@ export async function* sendMessageWithCustomHistory(customHistory) { messages: messagesForLLM, max_tokens: finalAvailable, stream: true, - options: { + // Disable Qwen3 reasoning: vLLM/llama.cpp honor chat_template_kwargs; + // options.think is Ollama-flavored fallback. Reasoning roughly 8x slower. + chat_template_kwargs: { + enable_thinking: false, + }, + options: { ...apiConfig.defaultOptions, }, }),