From ff19d407deafbc26d82b8f03886627440e20f204 Mon Sep 17 00:00:00 2001 From: hksdpc255 <43977088+hksdpc255@users.noreply.github.com> Date: Mon, 1 Dec 2025 17:26:32 +0800 Subject: [PATCH] Enable tool call in think for kimi-k2 --- common/chat-parser.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/chat-parser.cpp b/common/chat-parser.cpp index 67d71e1f53..21ce25f321 100644 --- a/common/chat-parser.cpp +++ b/common/chat-parser.cpp @@ -921,6 +921,7 @@ static void common_chat_parse_kimi_k2(common_chat_msg_parser & builder) { form.scope_end = "<|tool_calls_section_end|>"; form.raw_argval = false; form.last_val_end = ""; + form.allow_toolcall_in_think = true; return form; })(); builder.consume_reasoning_with_xml_tool_calls(form, "", "");