fix(stream): scrub MiniMax M3 Chinese reasoning markers - #43839
fix(stream): scrub MiniMax M3 Chinese reasoning markers#43839kiranmagic7 wants to merge 2 commits into
Conversation
|
Reviewed the diff — the approach is well-structured and consistent across all four touch points:
Test coverage spans the scrubber, CLI stream delta, gateway stream consumer, and agent runtime helpers — thorough. |
|
Quick status check after the review comment: latest head is still No code changes from my side since the validation in the PR body still matches this head:
Happy to refresh the branch or adjust the patch shape if maintainers want anything narrower. |
…inese-reasoning-scrub # Conflicts: # tests/gateway/test_stream_consumer.py
|
Refreshed this branch against current The only manual conflict was in Verification on
GitHub now reports the PR mergeable again. No behavior change beyond resolving main-branch drift. |
|
Status check on current head Review focus remains the line-boundary MiniMax M3 reasoning-marker scrub across runtime, CLI, and gateway streaming paths. |
|
Thanks for this, and for the detailed analysis in the linked issue. We're going to close it though — it runs against a standing design line: Hermes does not add parsing/scrubbing layers to strip a given model's bespoke raw reasoning delimiters. The existing English Concretely for MiniMax-M3: our provider plugin already sends There's also a correctness hazard specific to this fix: Not a knock on the work — the leak you saw is real to you. But the right fix lives in reasoning routing, not in a new raw-reasoning parser. Closing. |
Summary
思考,反思,推理,推敲) from streamed and final outputagent.think_scrubberso the core scrubber, gateway stream consumer, CLI fallback, and finalstrip_think_blocksstay aligned我在思考这个问题。is preservedValidation
git diff --checkuv run ruff check agent/think_scrubber.py agent/agent_runtime_helpers.py gateway/stream_consumer.py cli.py tests/agent/test_think_scrubber.py tests/gateway/test_stream_consumer.py tests/run_agent/test_run_agent.pyuv run --extra dev python -m pytest tests/agent/test_think_scrubber.py tests/gateway/test_stream_consumer.py::TestFilterAndAccumulate tests/run_agent/test_run_agent.py::TestStripThinkBlocks tests/run_agent/test_run_agent.py::TestStreamingApiCall::test_content_assembly -q— 94 passedscripts/run_tests.sh tests/agent/test_think_scrubber.py tests/gateway/test_stream_consumer.py tests/run_agent/test_run_agent.py -- -q— 517 passed