From adba1741480749f2e35e6d5ce8d024cd430bb682 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sat, 27 Jun 2026 17:45:41 +0300 Subject: [PATCH] server : hint preserve_thinking when supported by chat template Print a hint to enable preserve_thinking kwarg when the template supports it. ref: https://docs.z.ai/guides/capabilities/thinking-mode#preserved-thinking Assisted-by: pi:llama.cpp/Qwen3.6-27B --- common/chat.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/common/chat.cpp b/common/chat.cpp index 8f42fef844..283788e17d 100644 --- a/common/chat.cpp +++ b/common/chat.cpp @@ -367,8 +367,6 @@ bool common_chat_templates_support_enable_thinking(const common_chat_templates * return params.supports_thinking; } -// Check if the template source contains the preserve_thinking kwarg. -// This is useful for printing a hint to the user to enable it. bool common_chat_templates_support_preserve_thinking(const common_chat_templates * chat_templates) { std::string src = common_chat_templates_source(chat_templates); return src.find("preserve_thinking") != std::string::npos;