Skip to content

Fix MiniMax-M3 reasoning-token handling in validators#17

Closed
ywang96 wants to merge 1 commit into
MiniMax-AI:mainfrom
ywang96:fix/minimax-m3-mm-think-support
Closed

Fix MiniMax-M3 reasoning-token handling in validators#17
ywang96 wants to merge 1 commit into
MiniMax-AI:mainfrom
ywang96:fix/minimax-m3-mm-think-support

Conversation

@ywang96
Copy link
Copy Markdown
Contributor

@ywang96 ywang96 commented Jun 4, 2026

Summary

MiniMax-M3 wraps its chain-of-thought in a native <mm:think>...</mm:think> token (both <think> and <mm:think> are special tokens in the M3 tokenizer), carried inline in the message content.

Fix

Strip both tags:

re.sub(r"<(?:mm:)?think>.*?</(?:mm:)?think>", "", text, flags=re.DOTALL)

One-line change in validator/scenario_check.py; behavior for <think> is unchanged.

🤖 Generated with Claude Code

@ywang96 ywang96 force-pushed the fix/minimax-m3-mm-think-support branch 2 times, most recently from ba85185 to 0c9568e Compare June 4, 2026 07:17
MiniMax-M3 wraps its chain-of-thought in a native <mm:think>...</mm:think>
token (both <think> and <mm:think> are special tokens in the M3 tokenizer),
carried inline in `content`. ScenarioCheckValidator._get_visible_content only
stripped <think>...</think>, so the parameter-order check read the order from
inside the reasoning instead of the visible answer, causing spurious
Scenario-Check-Pass-Rate failures on M3. Strip both tags.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ywang96 ywang96 force-pushed the fix/minimax-m3-mm-think-support branch from 0c9568e to 8936e41 Compare June 4, 2026 07:18
@ywang96 ywang96 changed the title Fix MiniMax-M3 reasoning-token (<mm:think>) handling in validators Fix MiniMax-M3 <mm:think> reasoning token in Scenario-Check Jun 4, 2026
@ywang96 ywang96 changed the title Fix MiniMax-M3 <mm:think> reasoning token in Scenario-Check Fix MiniMax-M3 reasoning-token handling in validators Jun 4, 2026
@wumingxiami wumingxiami closed this Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants