spark-server: respect disabled MiniMax thinking#103
Open
lesserevil wants to merge 1 commit into
Open
Conversation
|
All contributors have signed the CLA. Thank you! |
6f4db32 to
f1734c6
Compare
Author
|
I have read the CLA Document and I hereby sign the CLA |
f1734c6 to
bbad2e5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MiniMax M2/M2.7's native HF template always appends an open
<think>at the generation prompt. This adds an OpenAI-variantminimax_m2template that keeps explicit thinking unchanged, but emits a closed<think>\n\n</think>\n\nprompt when a request resolves toenable_thinking=false, so default and tool-active requests no longer get forced or leaked reasoning despitethinking_default=false.Closes #
Test plan
cargo fmt --all -- --checkcargo test -p spark-server --lib tokenizer::tests -- --nocapturecargo test -p spark-server --lib tokenizer::tests::render_minimax_openai_template -- --nocaptureATLAS_SKIP_BUILD=1 CUDARC_CUDA_VERSION=13000 cargo clippy --workspace --tests -- -DwarningsReply with exactly: OKreturnsreasoning_tokens=0ATLAS_SKIP_BUILD=1 cargo clippy --workspace --tests --all-features -- -Dwarnings(not runnable on Linux: enabling all features pulls in the Metal backend's Apple-onlyobjc2dependency, which compile-errors outside Apple targets)bash scripts/check-license-headers.sh(script is not present in this checkout; CI uses SkyWalking Eyes with.licenserc.yaml, and this PR does not add any SPDX-covered source file type)typos(not installed locally)Notes for reviewers
The native MiniMax template path remains unchanged. The fix uses the existing
jinja-templates/openai/{model_type}.jinjalookup, mirroring the Qwen OpenAI-variant path. MiniMax needed a closed-thinking prompt, not simply no<think>prompt: with no tag, the model can still emit an implicit reasoning trace followed by</think>.CLA