From d53bfa35c5c4334f015ca63ddc627e27c985decd Mon Sep 17 00:00:00 2001 From: X-iZhang Date: Tue, 2 Jun 2026 00:00:52 +0100 Subject: [PATCH] feat: update MiniMax model entries and context window for M3 variant --- EvoScientist/config/onboard/steps.py | 3 ++- EvoScientist/llm/context_window.py | 4 ++++ EvoScientist/llm/models.py | 3 ++- tests/test_llm.py | 5 +++-- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/EvoScientist/config/onboard/steps.py b/EvoScientist/config/onboard/steps.py index 248084c..f387657 100644 --- a/EvoScientist/config/onboard/steps.py +++ b/EvoScientist/config/onboard/steps.py @@ -243,7 +243,8 @@ def _step_provider(config: EvoScientistConfig) -> str: Choice(title="OpenAI (GPT models — API / OAuth)", value="openai"), Choice(title="Google GenAI (Gemini models)", value="google-genai"), Choice( - title="MiniMax (M2 — M2.7 models, 204K context, thinking)", value="minimax" + title="MiniMax (M2 — M3 models, up to 1M context, thinking)", + value="minimax", ), Choice(title="ZhipuAI (智谱 — GLM models)", value="zhipu"), Choice( diff --git a/EvoScientist/llm/context_window.py b/EvoScientist/llm/context_window.py index fe22dbc..a1d62b9 100644 --- a/EvoScientist/llm/context_window.py +++ b/EvoScientist/llm/context_window.py @@ -24,6 +24,10 @@ _KNOWN_MODEL_CONTEXT_WINDOWS: dict[str, int] = { "grok-4.3": 1_000_000, # Claude Haiku 4.5 — exception to the ``claude-`` family (200K, not 1M). "claude-haiku-4-5": 200_000, + # MiniMax M3 — 1M context (M2.x variants stay at provider default ~204K). + # Covers OpenRouter ``minimax/minimax-m3`` (via split('/')[-1]) and direct + # ``MiniMax-M3`` (via lowercased exact match). + "minimax-m3": 1_000_000, } # Family-level fallbacks: tried only after exact-name lookup misses. diff --git a/EvoScientist/llm/models.py b/EvoScientist/llm/models.py index a128f14..85a22d2 100644 --- a/EvoScientist/llm/models.py +++ b/EvoScientist/llm/models.py @@ -108,6 +108,7 @@ _MODEL_ENTRIES: list[tuple[str, str, str]] = [ ("gemini-2.5-flash-lite", "gemini-2.5-flash-lite", "google-genai"), ("gemini-2.5-pro", "gemini-2.5-pro", "google-genai"), # MiniMax (direct API — Anthropic-compatible; default: api.minimaxi.com, global: api.minimax.io) + ("minimax-m3", "MiniMax-M3", "minimax"), ("minimax-m2.7", "MiniMax-M2.7", "minimax"), ("minimax-m2.7-highspeed", "MiniMax-M2.7-highspeed", "minimax"), ("minimax-m2.5", "MiniMax-M2.5", "minimax"), @@ -142,7 +143,7 @@ _MODEL_ENTRIES: list[tuple[str, str, str]] = [ ("gemini-3-flash", "google/gemini-3-flash-preview", "openrouter"), ("kimi-k2.6", "moonshotai/kimi-k2.6", "openrouter"), ("glm-5v-turbo", "z-ai/glm-5v-turbo", "openrouter"), - ("minimax-m2.7", "minimax/minimax-m2.7", "openrouter"), + ("minimax-m3", "minimax/minimax-m3", "openrouter"), ("mimo-v2.5-pro", "xiaomi/mimo-v2.5-pro", "openrouter"), ("mimo-v2.5", "xiaomi/mimo-v2.5", "openrouter"), ("grok-build-0.1", "x-ai/grok-build-0.1", "openrouter"), diff --git a/tests/test_llm.py b/tests/test_llm.py index d30781c..bd4ddb5 100644 --- a/tests/test_llm.py +++ b/tests/test_llm.py @@ -636,10 +636,11 @@ class TestMiniMaxProvider: assert "minimax" not in _OPENAI_ROUTED_PROVIDERS def test_minimax_models_registered(self): - """MiniMax should have 4 direct model entries in _MODEL_ENTRIES.""" + """MiniMax should have 5 direct model entries in _MODEL_ENTRIES.""" minimax_models = get_models_for_provider("minimax") - assert len(minimax_models) == 4 + assert len(minimax_models) == 5 model_names = {name for name, _ in minimax_models} + assert "minimax-m3" in model_names assert "minimax-m2.7" in model_names assert "minimax-m2.7-highspeed" in model_names assert "minimax-m2.5" in model_names