Skip to content

spark-server: respect MiniMax auto tool choice#104

Open
lesserevil wants to merge 1 commit into
Avarok-Cybersecurity:mainfrom
lesserevil:fix/minimax-auto-tools
Open

spark-server: respect MiniMax auto tool choice#104
lesserevil wants to merge 1 commit into
Avarok-Cybersecurity:mainfrom
lesserevil:fix/minimax-auto-tools

Conversation

@lesserevil
Copy link
Copy Markdown

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 -- --check
  • LIBRARY_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 -- --nocapture
  • LIBRARY_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 -- -Dwarnings
  • ATLAS_SKIP_BUILD=1 cargo clippy --workspace --tests --all-features -- -Dwarnings could not complete on this Linux host because the workspace hits the pre-existing objc2 Apple-platform compile gate before this change.
  • bash scripts/check-license-headers.sh could not run because scripts/check-license-headers.sh is not present in this checkout.
  • typos could not run because typos is not installed on this host.
  • Tested against a real model / hardware: deployed on godspeed + savitar with nvidia/MiniMax-M2.7-NVFP4 EP=2; Hermes hello! 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.
  • Added focused unit coverage for MiniMax auto/required/specific tool choices and loop suppression.

Notes for reviewers

This keeps bare-JSON tool mode required, but MiniMax XML tools now follow normal OpenAI auto semantics. 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

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.

1 participant