Unstable tool calling compared with 0711 version
Using the exact same prompt including the exact same tool descriptions, kimi-k2-0711 correctly calls the tool but 0905 will return the tool call string <tool_name>Arguments...</tool_name> instead of sending back a tool call reponse with finish_reason of tool_call.
When it works, it works perfectly with high precision tool calling but most of the time it just doesn't call the tools or I would need some weird prompt tweaking to make it work.
Update: Managed to reproduce the issue in a relatively stable manner. I defined a grep like tool which takes a pattern parameter to search for a regex in a piece of text. As long as I have this tool passed to the 0905 model, it just stops working. But the 0711 model handles the tool and calls the tool correctly.
I have the same feeling with you. the tool calling is unstable.
will the reason for tool call with 0905 is this : https://huggingface.co/moonshotai/Kimi-K2-Instruct-0905/blob/main/chat_template.jinja#L18?
https://huggingface.co/moonshotai/Kimi-K2-Instruct/blob/main/chat_template.jinja#L18
In 0905 it's been written as {% endif %} where as in 0711 it been written as {%- endif -%}
closure look tells there is '-' missing.