Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.
JavaScript aianthropiccross-platformgeminigroqlinuxmacosnvidiaopen-sourceopenaiparakeetspeech-to-texttranscribewhisperwindows
Fix/llamacpp qwen thinking suppression (#752)
Aakash Sunkari66f1c8772c4f
diff --git a/src/helpers/llamaServer.js b/src/helpers/llamaServer.jsindex ee445cbc1..2c518161e 100644--- a/src/helpers/llamaServer.js+++ b/src/helpers/llamaServer.js@@ -443,12 +443,20 @@ class LlamaServerManager {this.clearIdleTimer();- const body = JSON.stringify({+ const requestBody = {messages,temperature: options.temperature ?? 0.7,max_tokens: options.max_tokens ?? 512,stream: false,- });+ };++ // Without this, Qwen chat templates leave `message.content` empty and+ // route output into `reasoning_content`. Non-Qwen templates ignore it.+ if (options.disableThinking !== false) {+ requestBody.chat_template_kwargs = { enable_thinking: false };+ }++ const body = JSON.stringify(requestBody);return new Promise((resolve, reject) => {const startTime = Date.now();diff --git a/src/helpers/modelManagerBridge.js b/src/helpers/modelManagerBridge.jsindex 7ce5785c8..5bd3e9d1d 100644--- a/src/helpers/modelManagerBridge.js+++ b/src/helpers/modelManagerBridge.js@@ -395,6 +395,7 @@ class ModelManager {const result = await this.serverManager.inference(messages, {temperature: options.temperature ?? 0.7,max_tokens: options.maxTokens ?? 512,+ disableThinking: options.disableThinking,});const totalTime = Date.now() - startTime;diff --git a/src/services/localReasoningBridge.js b/src/services/localReasoningBridge.jsindex 1ac603ea1..3dfe378de 100644--- a/src/services/localReasoningBridge.js+++ b/src/services/localReasoningBridge.js@@ -40,6 +40,7 @@ class LocalReasoningService {contextSize: config.contextSize || 4096,threads: config.threads || 4,systemPrompt: config.systemPrompt || "",+ disableThinking: config.disableThinking !== false,};debugLogger.logReasoning("LOCAL_BRIDGE_INFERENCE", {