feat: Add MiniMax M3 tool-calling, reasoning, and conformance coverage - #83
Conversation
Signed-off-by: Indrajit Bhosale <iamindrajitb@gmail.com>
|
📊 Conformance matrix rendered — view in CI summary |
Signed-off-by: Indrajit Bhosale <iamindrajitb@gmail.com>
The HTML markup highlighter mis-split the MiniMax M3 namespace token ]<]minimax[>[ : the generic <...> rule matched <]minimax[>, rendering the token as a red orphan tag with stray ]/[ brackets before every structural tag. Recognize ]<]minimax[>[ as a whole token in _TAG_RE (higher priority than the generic rule) and color it as a muted namespace decoration (.tt-ns) in both the static (_colorize_xml) and streaming (_xml_token_intervals) paths. Streaming-split tokens across deltas are handled too.
There was a problem hiding this comment.
Reviewed the M3 work. Locally at 56447bd: 628 parser tests pass (12 new), all 3 parity suites pass, clippy clean.
]<]minimax[>[ is verified real -- MiniMax M3 namespace token 200058; checked the upstream chat_template.jinja (params encoded as tag names), so the config.rs M2-difference comment is accurate. The shared BasicReasoningParser opt-in recover_dangling_end is the right pattern -- extends the parent, no fork, no regression.
Pushed 14eb3bc: the HTML highlighter was rendering ]<]minimax[>[ as a red orphan tag before every structural tag; now muted (.tt-ns) in static + streaming.
Inline notes below. Nothing blocking.
…_token parse_parameter_value/parse_nested_minimax_xml hardcoded the ]<]minimax[>[ literal while the rest of the file derives every marker from config.namespace_token. Thread config through both and reuse parameter_start()/config.namespace_token so a non-default namespace_token no longer silently falls back to scalar parsing for nested values.
rmccorm4
left a comment
There was a problem hiding this comment.
LGTM after open comments addressed
Signed-off-by: Indrajit Bhosale <iamindrajitb@gmail.com>
|
Merging, as all opens addressed. |
Description
This adds MiniMax M3 support to the frontend parser crates and conformance matrix.
MiniMax M3 uses a namespace-token XML-ish tool-call format:
It also uses
<mm:think>...</mm:think>reasoning markers, where the opener canbe prompt-prefilled by the chat template.
Changes
minimax_m3/minimax-m3tool-call parser registration.MiniMaxM3ParserConfigandParserConfig::MiniMaxM3.<invoke name="...">callsminimax_m3/minimax-m3reasoning parser registration.reason</mm:think>answeris parsed as reasoning plus answer when the openerwas prompt-prefilled.
engines marked unavailable where they do not yet expose M3 parsers.
Notes
dynamo_rust,vllm_rust,vllm_python, andsglang_pythonunavailable fornow.
parsers_v2MiniMax M3 streaming parser.Validation
Rust parser coverage
Targeted MiniMax M3 parser tests:
cargo test --locked -p dynamo-parsers minimax_m3 -- --nocaptureThis covers:
minimax_m3andminimax-m3.<mm:think>...</mm:think>spans.reason</mm:think>answer.not leak into normal text.
<invoke>when the outertool_callclose ismissing.
normal text ending in
]or]<does not trigger MiniMax M3 tool-call mode,while
]<]and the full opener still do.Live E2E validation
In addition to the repo-local parser/conformance tests above, these
frontend-crates changes were built into the downstream Dynamo vLLM runtime image
and exercised in a live K8s deployment. Used
vllm/vllm-openai:minimax-m3vllm base container.