fix: MiniMax-M3 streaming parser when tool calls start before </mm:think>#2085
Conversation
|
convert to draft for now, saw another case to improve the parser. doing some more testing and will push a better version. |
d69221f to
5d5d996
Compare
|
Ok some improvements and more testing, so far the nested thinking and tools are all working well. Ready for review. |
5d5d996 to
3aa3621
Compare
|
@firecoperana we caught another issue with m3 this the 2nd commit (ffe7034) Codex explanation, I did ask if this low risk and code path is m3 specific.
|
MiniMax-M3 can start a tool call while its
<mm:think>block is stillunterminated in the streamed text. The existing parser treated the open thought
as normal reasoning only while waiting for
</mm:think>, which allowed theMiniMax tool-call namespace marker to be consumed as reasoning/content in some
streaming cases.
This PR updates the dedicated MiniMax-M3 parser so that, when tools are enabled,
the reasoning parser stops at either:
</mm:think>]<]minimax[>[<tool_call>That keeps partial reasoning quarantined during streaming and prevents MiniMax
tool-call markers from leaking into
reasoning_contentor visiblecontent.