spark-server: respect MiniMax auto tool choice#104
Open
lesserevil wants to merge 1 commit into
Open
Conversation
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 chat requests now resolve an effective tool mode before sampling so
tool_choice: "auto"remains optional instead of forcing<tool_call>generation. Loop suppression also disables tool-call grammar for one recovery turn unless the caller explicitly requires a tool call.Test plan
cargo fmt --all -- --checkLIBRARY_PATH=/opt/vllm/nccl-blackwell/lib LD_LIBRARY_PATH=/opt/vllm/nccl-blackwell/lib ATLAS_SKIP_BUILD=1 cargo test -p spark-server sampling_tool_mode -- --nocaptureLIBRARY_PATH=/opt/vllm/nccl-blackwell/lib LD_LIBRARY_PATH=/opt/vllm/nccl-blackwell/lib ATLAS_SKIP_BUILD=1 CUDARC_CUDA_VERSION=13000 cargo clippy -p spark-server --tests -- -DwarningsATLAS_SKIP_BUILD=1 cargo clippy --workspace --tests --all-features -- -Dwarningscould not complete on this Linux host because the workspace hits the pre-existingobjc2Apple-platform compile gate before this change.bash scripts/check-license-headers.shcould not run becausescripts/check-license-headers.shis not present in this checkout.typoscould not run becausetyposis not installed on this host.nvidia/MiniMax-M2.7-NVFP4EP=2; Hermeshello!returned a normal assistant response with no repeated recall/tool loop, and a direct synthetic loop-suppression request returned assistant text while logging tool-call grammar suppression.Notes for reviewers
This keeps bare-JSON tool mode required, but MiniMax XML tools now follow normal OpenAI
autosemantics. Positive<tool_call>logit bias is only applied when a tool call is required, and loop suppression now hard-masks tool-call start tokens because explicit required/specific requests are filtered out before reaching the scheduler.Benchmarks: not run; this is a tool-choice correctness fix, not a performance-oriented change.
Authorship: AI-generated by Codex under human operator direction; no human-written code sections are claimed.
CLA