Skip to content

Conversation

@hksdpc255
Copy link
Contributor

@hksdpc255 hksdpc255 commented Dec 3, 2025

Deepseek V3.2 uses a new tool-call format like this:

<|DSML|function_calls>
<|DSML|invoke name="get_datetime">
<|DSML|parameter name="timezone" string="true">Asia/Shanghai</|DSML|parameter>
</|DSML|invoke>
</|DSML|function_calls>
<|DSML|function_calls>
<|DSML|invoke name="search">
<|DSML|parameter name="query" string="true">search agent benchmark 2024</|DSML|parameter>
<|DSML|parameter name="topn" string="false">10</|DSML|parameter>
<|DSML|parameter name="source" string="true">web</|DSML|parameter>
</|DSML|invoke>
<|DSML|invoke name="search">
<|DSML|parameter name="query" string="true">搜索智能体 基准测试</|DSML|parameter>
<|DSML|parameter name="topn" string="false">10</|DSML|parameter>
<|DSML|parameter name="source" string="true">web</|DSML|parameter>
</|DSML|invoke>
</|DSML|function_calls>

This PR introduces the tool-call parser for the new DeepSeek V3.2 model.

Since the official release does not provide a chat template, a provisional template has been added and tested only with llama.cpp. Compatibility with other inference engines is not guaranteed and may require further adjustments.

In addition, Minja polyfill detection has been slightly updated to accommodate the new template structure.

Needs PR #17376 to be merged first. Edit: merged

@hksdpc255 hksdpc255 requested a review from pwilkin as a code owner December 9, 2025 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant