Skip to content

fix(minimax): align default_aux_model with M3 frontier (salvage #37664)#39024

Merged
teknium1 merged 3 commits into
mainfrom
hermes/hermes-c0dbebf5
Jun 4, 2026
Merged

fix(minimax): align default_aux_model with M3 frontier (salvage #37664)#39024
teknium1 merged 3 commits into
mainfrom
hermes/hermes-c0dbebf5

Conversation

@teknium1

@teknium1 teknium1 commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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-highspeed variant 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-cn default_aux_model M2.7 → M3; minimax-oauth M2.7-highspeed → M2.7 (M3 is not on the OAuth/Coding-Plan tier).
  • agent/auxiliary_client.py: drop the three dead minimax / minimax-oauth / minimax-cn entries 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.
  • Tests: update test_minimax_provider.py aux pins to M3; new tests/plugins/model_providers/test_minimax_profile.py parametrizes all three profiles and guards against the highspeed 2x-cost regression; test_api_key_providers.py asserts the profile (not the fallback dict) drives the OAuth aux model.

Validation

Before After
_get_aux_model_for_provider("minimax") MiniMax-M2.7 MiniMax-M3
_get_aux_model_for_provider("minimax-cn") MiniMax-M2.7 MiniMax-M3
_get_aux_model_for_provider("minimax-oauth") MiniMax-M2.7-highspeed MiniMax-M2.7
fallback-dict minimax entries 3 0
  • Targeted suite: 221/221 passing (test_minimax_provider, test_minimax_profile, test_api_key_providers).
  • E2E with isolated HERMES_HOME confirmed the profile layer drives each resolution and the fallback drift hazard is gone.

Catalog half (MiniMax-M3 in _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

MiniMax aux-model M3 frontier

Fearvox added 3 commits June 4, 2026 05:39
…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.
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-c0dbebf5 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9793 on HEAD, 9792 on base (🆕 +1)

🆕 New issues (1):

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.

@teknium1 teknium1 merged commit fa8e2f9 into main Jun 4, 2026
23 checks passed
@teknium1 teknium1 deleted the hermes/hermes-c0dbebf5 branch June 4, 2026 12:53
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/agent Core agent loop, run_agent.py, prompt builder provider/minimax MiniMax (Anthropic transport) labels Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P3 Low — cosmetic, nice to have provider/minimax MiniMax (Anthropic transport) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants