]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
Fix Kimi-K2 tool-call parsing issues (#17376)
authorhksdpc255 <redacted>
Mon, 8 Dec 2025 13:32:04 +0000 (00:32 +1100)
committerGitHub <redacted>
Mon, 8 Dec 2025 13:32:04 +0000 (14:32 +0100)
commit636fc17a376dacc01da20d508e6986a299b1f819
tree6716d527fa20191e0de0d84c117b2466764245f4
parent51e0c2d917c21826585e84be1c27f75147325de0
Fix Kimi-K2 tool-call parsing issues (#17376)

* Fix kimi-k2 parsing

* fix template & add more tests for kimi-k2

* Another fix for Kimi-K2 chat template.

* enable allow_toolcall_in_think for Kimi-K2

* Refine key-value separator and value end format

* Enable tool call in think for kimi-k2

* allow_toolcall_in_think is now tested with Kimi-K2

* Remove outdated TODO comment in XML tool call parser

Removed TODO comment about untested tool call feature.

* Rename function from "utf8_truncate_safe" to "utf8_truncate_safe_len"
common/chat-parser-xml-toolcall.cpp
common/chat-parser-xml-toolcall.h
common/chat-parser.cpp
models/templates/Kimi-K2-Instruct.jinja
models/templates/Kimi-K2-Thinking.jinja
tests/test-chat.cpp