Skip to content

chore(model): support minimax-m3 in minimax provider#36205

Closed
Csrayz wants to merge 5 commits into
NousResearch:mainfrom
Csrayz:fix/minimax-m3-context-length
Closed

chore(model): support minimax-m3 in minimax provider#36205
Csrayz wants to merge 5 commits into
NousResearch:mainfrom
Csrayz:fix/minimax-m3-context-length

Conversation

@Csrayz

@Csrayz Csrayz commented Jun 1, 2026

Copy link
Copy Markdown

What does this PR do?

  1. Add MiniMax-M3 and MiniMax-M3 highspeed model in the Minimax、Minimax-oauth and minimax-cn catalogs.
  2. Support 1M context.

Related Issue

#36196

Csrayz added 2 commits June 1, 2026 10:39
M3 family (launched 2026-06-01) has a 1M-token context window per
official docs, but the Step 8 fallback in get_model_context_length was
returning 204,800 (the M2 catch-all) because the substring match
"minimax" hit first.

Add an explicit "minimax-m3" entry at 1,000,000 in DEFAULT_CONTEXT_LENGTHS.
The longest-substring-first ordering means "minimax-m3" (11 chars)
wins over "minimax" (7 chars) for M3 model names, while M2 variants
(M2.7/M2.5/M2.1/M2) still resolve to 204,800 unchanged.

Test added in tests/agent/test_model_metadata.py covers both M3
positive cases and M2 regression cases.

Refs: https://platform.minimax.io/docs/guides/models-intro
MiniMax M3 was launched 2026-06-01 with 1M context window and native
multimodal support. Add it to all three MiniMax provider variants:

- minimax (global API)
- minimax-oauth (OAuth login)
- minimax-cn (China domestic API)

Both models are placed before the M2 series in each list so users
see the newest, most capable option first when running `hermes model`.
@Csrayz

Csrayz commented Jun 1, 2026

Copy link
Copy Markdown
Author

Support for 1M context in the MiniMax M3 model is relatively straightforward. However, regarding multimodal support, since I'm not very familiar with it, I'm still researching. Do you have any suggestions regarding multimodal support, @teknium1?

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have provider/minimax MiniMax (Anthropic transport) comp/cli CLI entry point, hermes_cli/, setup wizard comp/agent Core agent loop, run_agent.py, prompt builder labels Jun 1, 2026
@sthbryan

sthbryan commented Jun 1, 2026

Copy link
Copy Markdown

Does MiniMax-M3 highspeed exist?

@Csrayz

Csrayz commented Jun 1, 2026

Copy link
Copy Markdown
Author

Does MiniMax-M3 highspeed exist?

Seems like it has been recalled. I just checked https://api.minimaxi.com/v1/models and MiniMax-M3-highspeed is no longer there. Give me a moment to update the list.

Csrayz added 2 commits June 1, 2026 11:05
The test_minimax_m3_models_1m_context test was included in the initial
M3 support commits as part of an exploration branch. Removing it keeps
tests/agent/test_model_metadata.py in its stable pre-M3 state so the
branch only carries the production changes (model list + context length
defaults). The feature itself is verified via the LIVE suite on
gitea/origin.
MiniMax-M3-highspeed is an alias that resolves to the same endpoint as
MiniMax-M3. Removing it avoids confusion and keeps the provider model
list focused on distinct model families.
@Csrayz

Csrayz commented Jun 1, 2026

Copy link
Copy Markdown
Author

One sec, working on unit tests for the 1M context

Adds test_minimax_m3_models_1m_context to verify:
- minimax-m3 key exists in DEFAULT_CONTEXT_LENGTHS at 1M
- minimax catch-all remains at 204,800 for M2 series
- get_model_context_length resolves M3 -> 1M, M2 -> 204,800

Isolated from network via mock patches to ensure deterministic
fallback to the hardcoded defaults.
@Csrayz

Csrayz commented Jun 1, 2026

Copy link
Copy Markdown
Author

By the way, the website mentions:

Input tokens (including cache hits) above 512k are available in limited quantity for a limited time. Contact sales for access. Public availability is expected in the next few days.

Should we also limit the context window to 512k for now and enable 1M later once it's publicly available? The tricky part is that the v1 models endpoint doesn't return supported context length, so we can only configure it statically.

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 comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have provider/minimax MiniMax (Anthropic transport) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants