diff --git a/deepseekv4_tool_parser.py b/deepseekv4_tool_parser.py new file mode 100644 index 0000000..8a23caf --- /dev/null +++ b/deepseekv4_tool_parser.py @@ -0,0 +1,16 @@ +# SPDX-License-Identifier: Apache-2.0 +# SPDX-FileCopyrightText: Copyright contributors to the vLLM project + +from deepseekv32_tool_parser import DeepSeekV32ToolParser + + +class DeepSeekV4ToolParser(DeepSeekV32ToolParser): + """ + DeepSeek V4 DSML tool parser. + + V4 keeps the V3.2 DSML invoke/parameter grammar, but wraps tool calls in + ``<|DSML|tool_calls>`` instead of ``<|DSML|function_calls>``. + """ + + tool_call_start_token: str = "<|DSML|tool_calls>" + tool_call_end_token: str = ""