Skip to content

vllm.parser.minimax_m2

MiniMax M2 parser for XML-style tool calls.

MiniMax M2 tool call format::

<minimax:tool_call><invoke name="get_weather">
<parameter name="city">Seattle</parameter>
</invoke></minimax:tool_call>

Each <invoke> block becomes one tool call. The argument body consists of <parameter name="...">...</parameter> tags.

Classes:

  • MinimaxM2Parser –

    MiniMax M2 parser backed by the declarative parser engine.

MinimaxM2Parser

Bases: ParserEngine

MiniMax M2 parser backed by the declarative parser engine.

_minimax_m2_parse_args(raw_args, partial)

Return the arguments and the match of the open trailing value, if any.

_value_end_window(text)

Return the suffix of text that may still grow into a value end.