Skip to content

feat(minimax): add MiniMax-M3 default and model-aware thinking - #190

Open
octo-patch wants to merge 1 commit into
microsoft:mainfrom
octo-patch:octo/20260729-model-add-recvq9hgJu31wt
Open

feat(minimax): add MiniMax-M3 default and model-aware thinking#190
octo-patch wants to merge 1 commit into
microsoft:mainfrom
octo-patch:octo/20260729-model-add-recvq9hgJu31wt

Conversation

@octo-patch

Copy link
Copy Markdown

Reason: Expose the current MiniMax-M3 model as the default and make thinking behavior model-aware so MiniMax-M2.7 keeps its required always-on thinking.

Changes

  • Add MiniMax-M3 as the default deployment for the minimax_chat backend (skillopt/model/common.py, configs/_base_/default.yaml), while keeping MiniMax-M2.7 selectable via model.minimax_model.
  • Make thinking behavior model-aware in skillopt/model/minimax_backend.py. Previously a single shared boolean (disabled by default) drove chat_template_kwargs.enable_thinking for every deployment. Now:
    • MiniMax-M2.7 always sends enable_thinking: true because it only supports always-on thinking, regardless of the shared flag.
    • MiniMax-M3 honors the configurable minimax_enable_thinking flag (disabled by default) since it supports adaptive/disabled thinking.
  • Add tests/test_minimax_backend.py covering the new default and both thinking paths.

Checks

  • python3 -m ruff check skillopt/model/minimax_backend.py skillopt/model/common.py tests/test_minimax_backend.py — no new findings (two pre-existing end-of-file warnings are unrelated to this change).
  • python3 -m pytest tests/test_minimax_backend.py tests/test_model_change_warning.py — passed.

Expose MiniMax-M3 as the default minimax_chat deployment and keep
MiniMax-M2.7 selectable. Resolve thinking per model: MiniMax-M2.7
requires always-on thinking, while MiniMax-M3 supports adaptive or
disabled thinking controlled by the existing flag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 29, 2026 12:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the MiniMax chat backend defaults to use the current MiniMax-M3 deployment and makes the enable_thinking behavior depend on the selected MiniMax model, preserving MiniMax-M2.7’s always-on thinking requirement.

Changes:

  • Switched the default minimax_chat model from MiniMax-M2.7 to MiniMax-M3 in shared defaults and base config.
  • Added model-aware logic so MiniMax-M2.7 forces enable_thinking=true while MiniMax-M3 honors the configured thinking flag.
  • Added unit tests covering the new default and both thinking behaviors.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
skillopt/model/common.py Updates the minimax_chat backend’s default model to MiniMax-M3.
configs/_base_/default.yaml Updates the default model.minimax_model to MiniMax-M3.
skillopt/model/minimax_backend.py Introduces model-aware resolution for chat_template_kwargs.enable_thinking.
tests/test_minimax_backend.py Adds tests for the new default model and thinking behavior for M2.7 vs M3.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Yif-Yang Yif-Yang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the default to MiniMax-M3; that model name is valid and the direction is useful. The remaining blocker is the actual MiniMax wire protocol, not Azure compatibility.

The current implementation sends:

{"chat_template_kwargs": {"enable_thinking": false}}

That is a Qwen/Hugging Face-style field and is not part of MiniMax's documented OpenAI-compatible M3 request. MiniMax documents M3 thinking as the top-level field:

{"thinking": {"type": "adaptive"}}

or:

{"thinking": {"type": "disabled"}}

Reference: https://platform.minimax.io/docs/api-reference/text-openai-api

M2.x also does not support disabling thinking, so please preserve its always-on behavior without sending an unsupported field. Could you update the payload builder to emit the documented top-level thinking.type for M3, define a conservative behavior for unknown models, and change the tests to assert the exact wire payload (including the absence of chat_template_kwargs)?

A live MiniMax smoke test would be welcome if you have access, but it is not required if the mocked contract test precisely follows the official MiniMax schema. We are not asking this backend to support Azure OpenAI semantics.

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.

3 participants