From e3b3d4d75ece3c8e8c0eb12bb012e21e148fd251 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Sun, 31 May 2026 20:18:05 -0700 Subject: [PATCH] feat(models): add MiniMax-M3 to native minimax providers + 1M context (#36214) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add MiniMax-M3 to the minimax, minimax-oauth, and minimax-cn curated lists (these are hardcoded — the native Anthropic-format endpoint has no /v1/models listing and the providers aren't in _MODELS_DEV_PREFERRED, so new models don't auto-pull). Add a DEFAULT_CONTEXT_LENGTHS key 'minimax-m3' -> 1,000,000 so M3 resolves to its 1M context on every surface (native ID + OpenRouter/Nous slug) via longest-key-first substring match, while the M2.x series stays at 204,800. --- agent/model_metadata.py | 8 ++++++-- hermes_cli/models.py | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/agent/model_metadata.py b/agent/model_metadata.py index a2d9b2daa..38183aab6 100644 --- a/agent/model_metadata.py +++ b/agent/model_metadata.py @@ -200,8 +200,12 @@ DEFAULT_CONTEXT_LENGTHS = { "qwen3-coder-plus": 1000000, # 1M context "qwen3-coder": 262144, # 256K context "qwen": 131072, - # MiniMax — official docs: 204,800 context for all models - # https://platform.minimax.io/docs/api-reference/text-anthropic-api + # MiniMax — M3 is 1M context (max output 512K); M2.x series is 204,800. + # Keys use substring matching (longest-first), so "minimax-m3" wins over + # the generic "minimax" catch-all for the M3 slug on every surface + # (native MiniMax-M3, OpenRouter/Nous minimax/minimax-m3). + # https://platform.minimax.io/docs/api-reference/text-chat-openai + "minimax-m3": 1000000, "minimax": 204800, # GLM "glm": 202752, diff --git a/hermes_cli/models.py b/hermes_cli/models.py index 9a4ff8c58..4c3b7b475 100644 --- a/hermes_cli/models.py +++ b/hermes_cli/models.py @@ -295,16 +295,19 @@ _PROVIDER_MODELS: dict[str, list[str]] = { "kimi-k2-0905-preview", ], "minimax": [ + "MiniMax-M3", "MiniMax-M2.7", "MiniMax-M2.5", "MiniMax-M2.1", "MiniMax-M2", ], "minimax-oauth": [ + "MiniMax-M3", "MiniMax-M2.7", "MiniMax-M2.7-highspeed", ], "minimax-cn": [ + "MiniMax-M3", "MiniMax-M2.7", "MiniMax-M2.5", "MiniMax-M2.1",