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
This commit is contained in:
Georgi Gerganov 2026-06-27 17:45:41 +03:00
parent 3deb4d1711
commit 8cb25f997d

View File

@ -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;