fix(minimax): align default_aux_model with M3 frontier (salvage #37664)#39024
Merged
Conversation
…inimax-cn
The minimax / minimax-cn / minimax-oauth profiles still advertised
M2.7 (and M2.7-highspeed for OAuth) as their default_aux_model,
predating the M3 release (2026-06-01). The user-facing
_PROVIDER_MODELS['minimax'] catalog top entry is M3, and the
recommended config for a Token-Plan install now sets
model.default: MiniMax-M3, so the aux default was the only
remaining drift.
Updates:
* minimax default_aux_model: M2.7 -> M3
* minimax-cn default_aux_model: M2.7 -> M3
* minimax-oauth default_aux_model: M2.7-highspeed -> M2.7
(M3 is not on the OAuth / Coding Plan tier per
platform docs as of this PR; the highspeed
variant was the 2x-cost regression from #4082
that PR #6082 collapsed to plain M2.7 for
minimax / minimax-cn but missed OAuth)
* agent/auxiliary_client.py: drop the three legacy
_API_KEY_PROVIDER_AUX_MODELS_FALLBACK entries for the minimax
family. _get_aux_model_for_provider() reads from
ProviderProfile.default_aux_model first (line 250) and only
falls back to the dict when the profile has no aux model or
the profile import fails. With the profile now set, the dict
entries are dead code and a drift hazard. Mirrors the deepseek
cleanup in 773a0fa.
* tests/agent/test_minimax_provider.py: update the existing
TestMinimaxAuxModel assertions from MiniMax-M2.7 to MiniMax-M3
(the intent — 'standard, not highspeed' — is unchanged; the
pin value is).
* tests/plugins/model_providers/test_minimax_profile.py: new
file mirroring tests/plugins/model_providers/test_deepseek_profile.py.
Pins each of the three profiles' default_aux_model and
asserts _get_aux_model_for_provider() returns it. A second
class guards against the highspeed regression coming back.
Refs:
- Closes #36196 in spirit (M3 support — the catalog half of
that issue is #36212; this PR covers the profile half)
- Related: #4082 (M2.7-highspeed 2x-cost), #6082 (previous
M2.7-highspeed -> M2.7 fix that missed OAuth + the
auxiliary_client.py fallback dict)
- Pattern: 773a0fa (same profile-layer fix for deepseek)
…registered Two follow-ups to the M3 default-aux-model PR (#37664): 1. AUTHOR_MAP entry: add fearvox1015@gmail.com -> Fearvox so the check-attribution CI job recognises Nolan's real contributor email. The previous run of the attribution check on #37664 failed because the commit was authored as nolan@0xvox.com (wrong local git config) which isn't in AUTHOR_MAP. The commit itself is now re-authored to fearvox1015@gmail.com so both the per-commit check and the AUTHOR_MAP lookup pass. 2. tests/hermes_cli/test_api_key_providers.py::TestMinimaxOAuthProvider ::test_minimax_oauth_aux_model_registered was pinning the aux model in the legacy _API_KEY_PROVIDER_AUX_MODELS dict, which the PR correctly removed (mirrors the deepseek cleanup in 773a0fa). The test now asserts the new world order: the aux model comes from ProviderProfile.default_aux_model on the minimax-oauth profile, not the fallback dict. This is the same pattern that the profile-layer deepseek fix introduced.
Three Copilot inline review comments on #37664, two worth landing in a polish pass before merge: 1. auxiliary_client.py:270 — Copilot suggested keeping the minimax-* entries in _API_KEY_PROVIDER_AUX_MODELS_FALLBACK as a safety net for environments where the profile-based resolution can't import or run plugin discovery. **Declined.** The deepseek precedent (commit 773a0fa) explicitly removed deepseek from the same dict for the same reason — the profile layer is the source of truth and the dict is a legacy pre-profiles-system fallback. We do not want to fragment the codebase by provider: either the profile layer is authoritative or the dict is. The minimax PR picks profile (matching deepseek) and the dict stays cleaned up. The risk Copilot raises is real but theoretical — plugin discovery runs at import time of the providers module, which is the first thing any modern Hermes entrypoint imports. 2. tests/agent/test_minimax_provider.py:162 — Copilot flagged that the test class relies on _get_aux_model_for_provider() resolving via provider profiles but doesn't explicitly trigger plugin discovery. **Fixed.** Added 'import model_tools # noqa: F401' at the top of both test_minimax_aux_is_standard and test_minimax_aux_not_highspeed. The fixtures in the parallel test_minimax_profile.py already did this; the legacy test in test_minimax_provider.py was order-dependent and would silently break if anyone reorganised the test ordering. Pinned the dependency explicitly so the test is order-independent. 3. tests/plugins/model_providers/test_minimax_profile.py:46 — Copilot flagged that the docstring referenced a hard-coded line number 'hermes_cli/models.py:298' that would go stale. **Fixed.** Replaced with the symbol reference 'hermes_cli.models._PROVIDER_MODELS[\'minimax\']' which is stable under file edits and grep-friendly. The new docstring also reads more naturally — readers don't have to look up 'what's at line 298' to follow the reasoning. All 221 minimax-related tests still pass.
Contributor
🔎 Lint report:
|
| Rule | Count |
|---|---|
unresolved-import |
1 |
First entries
tests/plugins/model_providers/test_minimax_profile.py:23: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`
✅ Fixed issues: none
Unchanged: 5085 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
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
Aux tasks on MiniMax now run on M3 (the current frontier) instead of the stale M2.7 pin, and the OAuth path drops the 2x-cost
M2.7-highspeedvariant that #6082 fixed for the direct API providers but missed.Salvage of #37664 by @Fearvox onto current
main(original branch was 241 commits behind). Authorship preserved via cherry-pick + rebase-merge.Changes
plugins/model-providers/minimax/__init__.py:minimax&minimax-cndefault_aux_modelM2.7 → M3;minimax-oauthM2.7-highspeed → M2.7 (M3 is not on the OAuth/Coding-Plan tier).agent/auxiliary_client.py: drop the three deadminimax/minimax-oauth/minimax-cnentries from_API_KEY_PROVIDER_AUX_MODELS_FALLBACK— dead code once the profile sets the value, and a drift hazard. Mirrors the deepseek cleanup in 773a0fa.test_minimax_provider.pyaux pins to M3; newtests/plugins/model_providers/test_minimax_profile.pyparametrizes all three profiles and guards against the highspeed 2x-cost regression;test_api_key_providers.pyasserts the profile (not the fallback dict) drives the OAuth aux model.Validation
_get_aux_model_for_provider("minimax")_get_aux_model_for_provider("minimax-cn")_get_aux_model_for_provider("minimax-oauth")test_minimax_provider,test_minimax_profile,test_api_key_providers).Catalog half (
MiniMax-M3in_PROVIDER_MODELS["minimax"]) already landed on main independently; this is the profile-layer half.Credit
Original PR #37664 by @Fearvox (0xVox). All three commits cherry-picked with authorship preserved.
Infographic