chore(model): support minimax-m3 in minimax provider#36205
Conversation
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`.
|
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? |
|
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. |
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.
|
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.
|
By the way, the website mentions:
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. |
What does this PR do?
Related Issue
#36196