From 0d525192939c0c513b8cc6f06b47f6a42fbea121 Mon Sep 17 00:00:00 2001 From: PR Bot Date: Sat, 21 Mar 2026 01:29:53 +0800 Subject: [PATCH] feat: upgrade MiniMax from M2.5 to M2.7 and expand to more agents/categories MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Upgrade minimax-m2.5 → minimax-m2.7 (latest model) across all agents and categories - Replace minimax-m2.5-free with minimax-m2.7-highspeed (optimized speed variant) - Expand MiniMax fallback coverage to atlas, sisyphus-junior, writing, and unspecified-low - Add isMiniMaxModel() detection function in types.ts for model family detection - Update all tests (58 passing) and documentation --- docs/guide/agent-model-matching.md | 19 +++++++------ docs/guide/installation.md | 16 +++++------ docs/guide/overview.md | 2 +- docs/reference/configuration.md | 10 +++---- docs/reference/features.md | 4 +-- src/agents/AGENTS.md | 4 +-- src/agents/types.test.ts | 24 +++++++++++++++- src/agents/types.ts | 5 ++++ src/cli/model-fallback.ts | 4 +-- src/cli/openai-only-model-catalog.test.ts | 4 +-- src/shared/model-requirements.test.ts | 34 +++++++++++++++-------- src/shared/model-requirements.ts | 14 ++++++---- 12 files changed, 91 insertions(+), 49 deletions(-) diff --git a/docs/guide/agent-model-matching.md b/docs/guide/agent-model-matching.md index ec040b636..ad1f80b7d 100644 --- a/docs/guide/agent-model-matching.md +++ b/docs/guide/agent-model-matching.md @@ -92,10 +92,10 @@ These agents do grep, search, and retrieval. They intentionally use the fastest, | Agent | Role | Fallback Chain | Notes | | --------------------- | ------------------ | ---------------------------------------------- | ----------------------------------------------------- | -| **Explore** | Fast codebase grep | Grok Code Fast → opencode-go/minimax-m2.5 → MiniMax Free → Haiku → GPT-5-Nano | Speed is everything. Fire 10 in parallel. | -| **Librarian** | Docs/code search | opencode-go/minimax-m2.5 → MiniMax Free → Haiku → GPT-5-Nano | Doc retrieval doesn't need deep reasoning. | -| **Multimodal Looker** | Vision/screenshots | GPT-5.4 → opencode-go/kimi-k2.5 → GLM-4.6v → GPT-5-Nano | Uses the first available multimodal-capable fallback. | -| **Sisyphus-Junior** | Category executor | Claude Sonnet → opencode-go/kimi-k2.5 → GPT-5.4 → Big Pickle | Handles delegated category tasks. Sonnet-tier default. | +| **Explore** | Fast codebase grep | Grok Code Fast → opencode-go/minimax-m2.7-highspeed → MiniMax M2.7 → Haiku → GPT-5-Nano | Speed is everything. Fire 10 in parallel. | +| **Librarian** | Docs/code search | opencode-go/minimax-m2.7 → MiniMax M2.7-highspeed → Haiku → GPT-5-Nano | Doc retrieval doesn't need deep reasoning. | +| **Multimodal Looker** | Vision/screenshots | GPT-5.4 → opencode-go/kimi-k2.5 → GLM-4.6v → GPT-5-Nano | Uses the first available multimodal-capable fallback. | +| **Sisyphus-Junior** | Category executor | Claude Sonnet → opencode-go/kimi-k2.5 → GPT-5.4 → MiniMax M2.7 → Big Pickle | Handles delegated category tasks. Sonnet-tier default. | --- @@ -131,7 +131,8 @@ Principle-driven, explicit reasoning, deep technical capability. Best for agents | **Gemini 3.1 Pro** | Excels at visual/frontend tasks. Different reasoning style. Default for `visual-engineering` and `artistry`. | | **Gemini 3 Flash** | Fast. Good for doc search and light tasks. | | **Grok Code Fast 1** | Blazing fast code grep. Default for Explore agent. | -| **MiniMax M2.5** | Fast and smart. Good for utility tasks and search/retrieval. | +| **MiniMax M2.7** | Fast and smart. Good for utility tasks and search/retrieval. Upgraded from M2.5 with better reasoning. | +| **MiniMax M2.7 Highspeed** | Ultra-fast variant. Optimized for latency-sensitive tasks like codebase grep. | ### OpenCode Go @@ -143,11 +144,11 @@ A premium subscription tier ($10/month) that provides reliable access to Chinese | ------------------------ | --------------------------------------------------------------------- | | **opencode-go/kimi-k2.5** | Vision-capable, Claude-like reasoning. Used by Sisyphus, Atlas, Sisyphus-Junior, Multimodal Looker. | | **opencode-go/glm-5** | Text-only orchestration model. Used by Oracle, Prometheus, Metis, Momus. | -| **opencode-go/minimax-m2.5** | Ultra-cheap, fast responses. Used by Librarian, Explore for utility work. | +| **opencode-go/minimax-m2.7** | Ultra-cheap, fast responses. Used by Librarian, Explore, Atlas, Sisyphus-Junior for utility work. | **When It Gets Used:** -OpenCode Go models appear in fallback chains as intermediate options. They bridge the gap between premium Claude access and free-tier alternatives. The system tries OpenCode Go models before falling back to free tiers (MiniMax Free, Big Pickle) or GPT alternatives. +OpenCode Go models appear in fallback chains as intermediate options. They bridge the gap between premium Claude access and free-tier alternatives. The system tries OpenCode Go models before falling back to free tiers (MiniMax M2.7-highspeed, Big Pickle) or GPT alternatives. **Go-Only Scenarios:** @@ -155,7 +156,7 @@ Some model identifiers like `k2p5` (paid Kimi K2.5) and `glm-5` may only be avai ### About Free-Tier Fallbacks -You may see model names like `kimi-k2.5-free`, `minimax-m2.5-free`, or `big-pickle` (GLM 4.6) in the source code or logs. These are free-tier versions of the same model families, served through the OpenCode Zen provider. They exist as lower-priority entries in fallback chains. +You may see model names like `kimi-k2.5-free`, `minimax-m2.7-highspeed`, or `big-pickle` (GLM 4.6) in the source code or logs. These are free-tier or speed-optimized versions of the same model families. They exist as lower-priority entries in fallback chains. You don't need to configure them. The system includes them so it degrades gracefully when you don't have every paid subscription. If you have the paid version, the paid version is always preferred. @@ -171,7 +172,7 @@ When agents delegate work, they don't pick a model name — they pick a **catego | `ultrabrain` | Maximum reasoning needed | GPT-5.4 → Gemini 3.1 Pro → Claude Opus → opencode-go/glm-5 | | `deep` | Deep coding, complex logic | GPT-5.3 Codex → Claude Opus → Gemini 3.1 Pro | | `artistry` | Creative, novel approaches | Gemini 3.1 Pro → Claude Opus → GPT-5.4 | -| `quick` | Simple, fast tasks | GPT-5.4 Mini → Claude Haiku → Gemini Flash → opencode-go/minimax-m2.5 → GPT-5-Nano | +| `quick` | Simple, fast tasks | GPT-5.4 Mini → Claude Haiku → Gemini Flash → opencode-go/minimax-m2.7 → GPT-5-Nano | | `unspecified-high` | General complex work | Claude Opus → GPT-5.4 → GLM 5 → K2P5 → opencode-go/glm-5 → Kimi K2.5 | | `unspecified-low` | General standard work | Claude Sonnet → GPT-5.3 Codex → opencode-go/kimi-k2.5 → Gemini Flash | | `writing` | Text, docs, prose | Gemini Flash → opencode-go/kimi-k2.5 → Claude Sonnet | diff --git a/docs/guide/installation.md b/docs/guide/installation.md index edef25592..fd1a2367b 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -69,7 +69,7 @@ Ask the user these questions to determine CLI options: - If **no** → `--zai-coding-plan=no` (default) 7. **Do you have an OpenCode Go subscription?** - - OpenCode Go is a $10/month subscription providing access to GLM-5, Kimi K2.5, and MiniMax M2.5 models + - OpenCode Go is a $10/month subscription providing access to GLM-5, Kimi K2.5, and MiniMax M2.7 models - If **yes** → `--opencode-go=yes` - If **no** → `--opencode-go=no` (default) @@ -227,7 +227,7 @@ If Z.ai is your main provider, the most important fallbacks are: #### OpenCode Zen -OpenCode Zen provides access to `opencode/` prefixed models including `opencode/claude-opus-4-6`, `opencode/gpt-5.4`, `opencode/gpt-5.3-codex`, `opencode/gpt-5-nano`, `opencode/glm-5`, `opencode/big-pickle`, and `opencode/minimax-m2.5-free`. +OpenCode Zen provides access to `opencode/` prefixed models including `opencode/claude-opus-4-6`, `opencode/gpt-5.4`, `opencode/gpt-5.3-codex`, `opencode/gpt-5-nano`, `opencode/glm-5`, `opencode/big-pickle`, and `opencode/minimax-m2.7-highspeed`. When OpenCode Zen is the best available provider (no native or Copilot), these models are used: @@ -236,7 +236,7 @@ When OpenCode Zen is the best available provider (no native or Copilot), these m | **Sisyphus** | `opencode/claude-opus-4-6` | | **Oracle** | `opencode/gpt-5.4` | | **Explore** | `opencode/gpt-5-nano` | -| **Librarian** | `opencode/minimax-m2.5-free` / `opencode/big-pickle` | +| **Librarian** | `opencode/minimax-m2.7-highspeed` / `opencode/big-pickle` | ##### Setup @@ -296,8 +296,8 @@ Not all models behave the same way. Understanding which models are "similar" hel | --------------------- | -------------------------------- | ----------------------------------------------------------- | | **Gemini 3 Pro** | google, github-copilot, opencode | Excels at visual/frontend tasks. Different reasoning style. | | **Gemini 3 Flash** | google, github-copilot, opencode | Fast, good for doc search and light tasks. | -| **MiniMax M2.5** | venice | Fast and smart. Good for utility tasks. | -| **MiniMax M2.5 Free** | opencode | Free-tier MiniMax. Fast for search/retrieval. | +| **MiniMax M2.7** | venice, opencode-go | Fast and smart. Good for utility tasks. Upgraded from M2.5. | +| **MiniMax M2.7 Highspeed** | opencode | Ultra-fast MiniMax variant. Optimized for latency. | **Speed-Focused Models**: @@ -305,7 +305,7 @@ Not all models behave the same way. Understanding which models are "similar" hel | ----------------------- | ---------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | **Grok Code Fast 1** | github-copilot, venice | Very fast | Optimized for code grep/search. Default for Explore. | | **Claude Haiku 4.5** | anthropic, opencode | Fast | Good balance of speed and intelligence. | -| **MiniMax M2.5 (Free)** | opencode, venice | Fast | Smart for its speed class. | +| **MiniMax M2.7 Highspeed** | opencode | Very fast | Ultra-fast MiniMax variant. Smart for its speed class. | | **GPT-5.3-codex-spark** | openai | Extremely fast | Blazing fast but compacts so aggressively that oh-my-opencode's context management doesn't work well with it. Not recommended for omo agents. | #### What Each Agent Does and Which Model It Got @@ -344,8 +344,8 @@ These agents do search, grep, and retrieval. They intentionally use fast, cheap | Agent | Role | Default Chain | Design Rationale | | --------------------- | ------------------ | ---------------------------------------------------------------------- | -------------------------------------------------------------- | -| **Explore** | Fast codebase grep | MiniMax M2.5 Free → Grok Code Fast → MiniMax M2.5 → Haiku → GPT-5-Nano | Speed is everything. Grok is blazing fast for grep. | -| **Librarian** | Docs/code search | MiniMax M2.5 Free → Gemini Flash → Big Pickle | Entirely free-tier. Doc retrieval doesn't need deep reasoning. | +| **Explore** | Fast codebase grep | Grok Code Fast → MiniMax M2.7-highspeed → MiniMax M2.7 → Haiku → GPT-5-Nano | Speed is everything. Grok is blazing fast for grep. | +| **Librarian** | Docs/code search | MiniMax M2.7 → MiniMax M2.7-highspeed → Haiku → GPT-5-Nano | Doc retrieval doesn't need deep reasoning. MiniMax is fast. | | **Multimodal Looker** | Vision/screenshots | Kimi K2.5 → Kimi Free → Gemini Flash → GPT-5.4 → GLM-4.6v | Kimi excels at multimodal understanding. | #### Why Different Models Need Different Prompts diff --git a/docs/guide/overview.md b/docs/guide/overview.md index 78f34937f..3d44d543e 100644 --- a/docs/guide/overview.md +++ b/docs/guide/overview.md @@ -221,7 +221,7 @@ You can override specific agents or categories in your config: **Different-behavior models**: - Gemini 3 Pro — excels at visual/frontend tasks -- MiniMax M2.5 — fast and smart for utility tasks +- MiniMax M2.7 / M2.7-highspeed — fast and smart for utility tasks - Grok Code Fast 1 — optimized for code grep/search See the [Agent-Model Matching Guide](./agent-model-matching.md) for complete details on which models work best for each agent, safe vs dangerous overrides, and provider priority chains. diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index bfa80ed5a..f39760322 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -270,8 +270,8 @@ Disable categories: `{ "disabled_categories": ["ultrabrain"] }` | **Sisyphus** | `claude-opus-4-6` | `claude-opus-4-6` → `glm-5` → `big-pickle` | | **Hephaestus** | `gpt-5.3-codex` | `gpt-5.3-codex` → `gpt-5.4` (GitHub Copilot fallback) | | **oracle** | `gpt-5.4` | `gpt-5.4` → `gemini-3.1-pro` → `claude-opus-4-6` | -| **librarian** | `gemini-3-flash` | `gemini-3-flash` → `minimax-m2.5-free` → `big-pickle` | -| **explore** | `grok-code-fast-1` | `grok-code-fast-1` → `minimax-m2.5-free` → `claude-haiku-4-5` → `gpt-5-nano` | +| **librarian** | `minimax-m2.7` | `minimax-m2.7` → `minimax-m2.7-highspeed` → `claude-haiku-4-5` → `gpt-5-nano` | +| **explore** | `grok-code-fast-1` | `grok-code-fast-1` → `minimax-m2.7-highspeed` → `minimax-m2.7` → `claude-haiku-4-5` → `gpt-5-nano` | | **multimodal-looker** | `gpt-5.3-codex` | `gpt-5.3-codex` → `k2p5` → `gemini-3-flash` → `glm-4.6v` → `gpt-5-nano` | | **Prometheus** | `claude-opus-4-6` | `claude-opus-4-6` → `gpt-5.4` → `gemini-3.1-pro` | | **Metis** | `claude-opus-4-6` | `claude-opus-4-6` → `gpt-5.4` → `gemini-3.1-pro` | @@ -286,10 +286,10 @@ Disable categories: `{ "disabled_categories": ["ultrabrain"] }` | **ultrabrain** | `gpt-5.4` | `gpt-5.4` → `gemini-3.1-pro` → `claude-opus-4-6` | | **deep** | `gpt-5.3-codex` | `gpt-5.3-codex` → `claude-opus-4-6` → `gemini-3.1-pro` | | **artistry** | `gemini-3.1-pro` | `gemini-3.1-pro` → `claude-opus-4-6` → `gpt-5.4` | -| **quick** | `gpt-5.4-mini` | `gpt-5.4-mini` → `claude-haiku-4-5` → `gemini-3-flash` → `minimax-m2.5` → `gpt-5-nano` | -| **unspecified-low** | `claude-sonnet-4-6` | `claude-sonnet-4-6` → `gpt-5.3-codex` → `gemini-3-flash` | +| **quick** | `gpt-5.4-mini` | `gpt-5.4-mini` → `claude-haiku-4-5` → `gemini-3-flash` → `minimax-m2.7` → `gpt-5-nano` | +| **unspecified-low** | `claude-sonnet-4-6` | `claude-sonnet-4-6` → `gpt-5.3-codex` → `gemini-3-flash` → `minimax-m2.7` | | **unspecified-high** | `claude-opus-4-6` | `claude-opus-4-6` → `gpt-5.4 (high)` → `glm-5` → `k2p5` → `kimi-k2.5` | -| **writing** | `gemini-3-flash` | `gemini-3-flash` → `claude-sonnet-4-6` | +| **writing** | `gemini-3-flash` | `gemini-3-flash` → `claude-sonnet-4-6` → `minimax-m2.7` | Run `bunx oh-my-opencode doctor --verbose` to see effective model resolution for your config. diff --git a/docs/reference/features.md b/docs/reference/features.md index 09082dc3b..5240424b4 100644 --- a/docs/reference/features.md +++ b/docs/reference/features.md @@ -11,8 +11,8 @@ Oh-My-OpenCode provides 11 specialized AI agents. Each has distinct expertise, o | **Sisyphus** | `claude-opus-4-6` | The default orchestrator. Plans, delegates, and executes complex tasks using specialized subagents with aggressive parallel execution. Todo-driven workflow with extended thinking (32k budget). Fallback: `glm-5` → `big-pickle`. | | **Hephaestus** | `gpt-5.3-codex` | The Legitimate Craftsman. Autonomous deep worker inspired by AmpCode's deep mode. Goal-oriented execution with thorough research before action. Explores codebase patterns, completes tasks end-to-end without premature stopping. Named after the Greek god of forge and craftsmanship. Fallback: `gpt-5.4` on GitHub Copilot. Requires a GPT-capable provider. | | **Oracle** | `gpt-5.4` | Architecture decisions, code review, debugging. Read-only consultation with stellar logical reasoning and deep analysis. Inspired by AmpCode. Fallback: `gemini-3.1-pro` → `claude-opus-4-6`. | -| **Librarian** | `gemini-3-flash` | Multi-repo analysis, documentation lookup, OSS implementation examples. Deep codebase understanding with evidence-based answers. Fallback: `minimax-m2.5-free` → `big-pickle`. | -| **Explore** | `grok-code-fast-1` | Fast codebase exploration and contextual grep. Fallback: `minimax-m2.5-free` → `claude-haiku-4-5` → `gpt-5-nano`. | +| **Librarian** | `minimax-m2.7` | Multi-repo analysis, documentation lookup, OSS implementation examples. Deep codebase understanding with evidence-based answers. Fallback: `minimax-m2.7-highspeed` → `claude-haiku-4-5` → `gpt-5-nano`. | +| **Explore** | `grok-code-fast-1` | Fast codebase exploration and contextual grep. Fallback: `minimax-m2.7-highspeed` → `minimax-m2.7` → `claude-haiku-4-5` → `gpt-5-nano`. | | **Multimodal-Looker** | `gpt-5.3-codex` | Visual content specialist. Analyzes PDFs, images, diagrams to extract information. Fallback: `k2p5` → `gemini-3-flash` → `glm-4.6v` → `gpt-5-nano`. | ### Planning Agents diff --git a/src/agents/AGENTS.md b/src/agents/AGENTS.md index a4dcf175a..49b7830f2 100644 --- a/src/agents/AGENTS.md +++ b/src/agents/AGENTS.md @@ -13,8 +13,8 @@ Agent factories following `createXXXAgent(model) → AgentConfig` pattern. Each | **Sisyphus** | claude-opus-4-6 max | 0.1 | all | k2p5 → kimi-k2.5 → gpt-5.4 medium → glm-5 → big-pickle | Main orchestrator, plans + delegates | | **Hephaestus** | gpt-5.3-codex medium | 0.1 | all | gpt-5.4 medium (copilot) | Autonomous deep worker | | **Oracle** | gpt-5.4 high | 0.1 | subagent | gemini-3.1-pro high → claude-opus-4-6 max | Read-only consultation | -| **Librarian** | gemini-3-flash | 0.1 | subagent | minimax-m2.5-free → big-pickle | External docs/code search | -| **Explore** | grok-code-fast-1 | 0.1 | subagent | minimax-m2.5-free → claude-haiku-4-5 → gpt-5-nano | Contextual grep | +| **Librarian** | minimax-m2.7 | 0.1 | subagent | minimax-m2.7-highspeed → claude-haiku-4-5 → gpt-5-nano | External docs/code search | +| **Explore** | grok-code-fast-1 | 0.1 | subagent | minimax-m2.7-highspeed → minimax-m2.7 → claude-haiku-4-5 → gpt-5-nano | Contextual grep | | **Multimodal-Looker** | gpt-5.3-codex medium | 0.1 | subagent | k2p5 → gemini-3-flash → glm-4.6v → gpt-5-nano | PDF/image analysis | | **Metis** | claude-opus-4-6 max | **0.3** | subagent | gpt-5.4 high → gemini-3.1-pro high | Pre-planning consultant | | **Momus** | gpt-5.4 xhigh | 0.1 | subagent | claude-opus-4-6 max → gemini-3.1-pro high | Plan reviewer | diff --git a/src/agents/types.test.ts b/src/agents/types.test.ts index 5d712fc94..c911324fd 100644 --- a/src/agents/types.test.ts +++ b/src/agents/types.test.ts @@ -1,5 +1,5 @@ import { describe, test, expect } from "bun:test"; -import { isGptModel, isGeminiModel, isGpt5_4Model } from "./types"; +import { isGptModel, isGeminiModel, isGpt5_4Model, isMiniMaxModel } from "./types"; describe("isGpt5_4Model", () => { test("detects gpt-5.4 models", () => { @@ -79,6 +79,28 @@ describe("isGptModel", () => { }); }); +describe("isMiniMaxModel", () => { + test("detects minimax models with provider prefix", () => { + expect(isMiniMaxModel("opencode-go/minimax-m2.7")).toBe(true); + expect(isMiniMaxModel("opencode/minimax-m2.7-highspeed")).toBe(true); + expect(isMiniMaxModel("opencode-go/minimax-m2.5")).toBe(true); + expect(isMiniMaxModel("opencode/minimax-m2.5-free")).toBe(true); + }); + + test("detects minimax models without provider prefix", () => { + expect(isMiniMaxModel("minimax-m2.7")).toBe(true); + expect(isMiniMaxModel("minimax-m2.7-highspeed")).toBe(true); + expect(isMiniMaxModel("minimax-m2.5")).toBe(true); + }); + + test("does not match non-minimax models", () => { + expect(isMiniMaxModel("openai/gpt-5.4")).toBe(false); + expect(isMiniMaxModel("anthropic/claude-opus-4-6")).toBe(false); + expect(isMiniMaxModel("google/gemini-3.1-pro")).toBe(false); + expect(isMiniMaxModel("opencode-go/kimi-k2.5")).toBe(false); + }); +}); + describe("isGeminiModel", () => { test("#given google provider models #then returns true", () => { expect(isGeminiModel("google/gemini-3.1-pro")).toBe(true); diff --git a/src/agents/types.ts b/src/agents/types.ts index acf490007..6a21156f8 100644 --- a/src/agents/types.ts +++ b/src/agents/types.ts @@ -91,6 +91,11 @@ export function isGpt5_3CodexModel(model: string): boolean { const GEMINI_PROVIDERS = ["google/", "google-vertex/"]; +export function isMiniMaxModel(model: string): boolean { + const modelName = extractModelName(model).toLowerCase(); + return modelName.includes("minimax"); +} + export function isGeminiModel(model: string): boolean { if (GEMINI_PROVIDERS.some((prefix) => model.startsWith(prefix))) return true; diff --git a/src/cli/model-fallback.ts b/src/cli/model-fallback.ts index f0b044978..331c97142 100644 --- a/src/cli/model-fallback.ts +++ b/src/cli/model-fallback.ts @@ -55,7 +55,7 @@ export function generateModelConfig(config: InstallConfig): GeneratedOmoConfig { for (const [role, req] of Object.entries(CLI_AGENT_MODEL_REQUIREMENTS)) { if (role === "librarian") { if (avail.opencodeGo) { - agents[role] = { model: "opencode-go/minimax-m2.5" } + agents[role] = { model: "opencode-go/minimax-m2.7" } } else if (avail.zai) { agents[role] = { model: ZAI_MODEL } } @@ -68,7 +68,7 @@ export function generateModelConfig(config: InstallConfig): GeneratedOmoConfig { } else if (avail.opencodeZen) { agents[role] = { model: "opencode/claude-haiku-4-5" } } else if (avail.opencodeGo) { - agents[role] = { model: "opencode-go/minimax-m2.5" } + agents[role] = { model: "opencode-go/minimax-m2.7" } } else if (avail.copilot) { agents[role] = { model: "github-copilot/gpt-5-mini" } } else { diff --git a/src/cli/openai-only-model-catalog.test.ts b/src/cli/openai-only-model-catalog.test.ts index ef384ab5e..2b9cae55b 100644 --- a/src/cli/openai-only-model-catalog.test.ts +++ b/src/cli/openai-only-model-catalog.test.ts @@ -53,8 +53,8 @@ describe("generateModelConfig OpenAI-only model catalog", () => { const result = generateModelConfig(config) // #then - expect(result.agents?.explore).toEqual({ model: "opencode-go/minimax-m2.5" }) - expect(result.agents?.librarian).toEqual({ model: "opencode-go/minimax-m2.5" }) + expect(result.agents?.explore).toEqual({ model: "opencode-go/minimax-m2.7" }) + expect(result.agents?.librarian).toEqual({ model: "opencode-go/minimax-m2.7" }) expect(result.categories?.quick).toEqual({ model: "openai/gpt-5.4-mini" }) }) }) diff --git a/src/shared/model-requirements.test.ts b/src/shared/model-requirements.test.ts index d69de0ef5..d09a4530a 100644 --- a/src/shared/model-requirements.test.ts +++ b/src/shared/model-requirements.test.ts @@ -64,23 +64,23 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { expect(last.model).toBe("big-pickle") }) - test("librarian has valid fallbackChain with opencode-go/minimax-m2.5 as primary", () => { + test("librarian has valid fallbackChain with opencode-go/minimax-m2.7 as primary", () => { // given - librarian agent requirement const librarian = AGENT_MODEL_REQUIREMENTS["librarian"] // when - accessing librarian requirement - // then - fallbackChain exists with opencode-go/minimax-m2.5 as first entry + // then - fallbackChain exists with opencode-go/minimax-m2.7 as first entry expect(librarian).toBeDefined() expect(librarian.fallbackChain).toBeArray() expect(librarian.fallbackChain.length).toBeGreaterThan(0) const primary = librarian.fallbackChain[0] expect(primary.providers[0]).toBe("opencode-go") - expect(primary.model).toBe("minimax-m2.5") + expect(primary.model).toBe("minimax-m2.7") const second = librarian.fallbackChain[1] expect(second.providers[0]).toBe("opencode") - expect(second.model).toBe("minimax-m2.5-free") + expect(second.model).toBe("minimax-m2.7-highspeed") const tertiary = librarian.fallbackChain[2] expect(tertiary.providers).toContain("anthropic") @@ -95,7 +95,7 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { const explore = AGENT_MODEL_REQUIREMENTS["explore"] // when - accessing explore requirement - // then - fallbackChain: grok → opencode-go/minimax → minimax-free → haiku → nano + // then - fallbackChain: grok → minimax-m2.7-highspeed → minimax-m2.7 → haiku → nano expect(explore).toBeDefined() expect(explore.fallbackChain).toBeArray() expect(explore.fallbackChain).toHaveLength(5) @@ -106,11 +106,11 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { const secondary = explore.fallbackChain[1] expect(secondary.providers).toContain("opencode-go") - expect(secondary.model).toBe("minimax-m2.5") + expect(secondary.model).toBe("minimax-m2.7-highspeed") const tertiary = explore.fallbackChain[2] expect(tertiary.providers).toContain("opencode") - expect(tertiary.model).toBe("minimax-m2.5-free") + expect(tertiary.model).toBe("minimax-m2.7") const quaternary = explore.fallbackChain[3] expect(quaternary.providers).toContain("anthropic") @@ -211,7 +211,7 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { // then - fallbackChain exists with claude-sonnet-4-6 as first entry expect(atlas).toBeDefined() expect(atlas.fallbackChain).toBeArray() - expect(atlas.fallbackChain.length).toBeGreaterThan(0) + expect(atlas.fallbackChain).toHaveLength(4) const primary = atlas.fallbackChain[0] expect(primary.model).toBe("claude-sonnet-4-6") @@ -227,15 +227,20 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { model: "gpt-5.4", variant: "medium", }) + + const quaternary = atlas.fallbackChain[3] + expect(quaternary.model).toBe("minimax-m2.7") + expect(quaternary.providers[0]).toBe("opencode-go") }) - test("sisyphus-junior has an OpenAI fallback before big-pickle", () => { + test("sisyphus-junior has an OpenAI fallback and minimax before big-pickle", () => { // given - sisyphus-junior agent requirement const sisyphusJunior = AGENT_MODEL_REQUIREMENTS["sisyphus-junior"] // when - locating the OpenAI fallback entry const openAiFallback = sisyphusJunior.fallbackChain.find((entry) => entry.providers.includes("openai")) const openAiFallbackIndex = sisyphusJunior.fallbackChain.findIndex((entry) => entry.providers.includes("openai")) + const minimaxIndex = sisyphusJunior.fallbackChain.findIndex((entry) => entry.model === "minimax-m2.7") const bigPickleIndex = sisyphusJunior.fallbackChain.findIndex((entry) => entry.model === "big-pickle") // then @@ -245,7 +250,8 @@ describe("AGENT_MODEL_REQUIREMENTS", () => { variant: "medium", }) expect(openAiFallbackIndex).toBeGreaterThan(-1) - expect(bigPickleIndex).toBeGreaterThan(openAiFallbackIndex) + expect(minimaxIndex).toBeGreaterThan(openAiFallbackIndex) + expect(bigPickleIndex).toBeGreaterThan(minimaxIndex) }) test("hephaestus supports openai, github-copilot, venice, and opencode providers", () => { @@ -437,10 +443,10 @@ describe("CATEGORY_MODEL_REQUIREMENTS", () => { const writing = CATEGORY_MODEL_REQUIREMENTS["writing"] // when - accessing writing requirement - // then - fallbackChain: gemini-3-flash -> kimi-k2.5 -> claude-sonnet-4-6 + // then - fallbackChain: gemini-3-flash -> kimi-k2.5 -> claude-sonnet-4-6 -> minimax-m2.7 expect(writing).toBeDefined() expect(writing.fallbackChain).toBeArray() - expect(writing.fallbackChain).toHaveLength(3) + expect(writing.fallbackChain).toHaveLength(4) const primary = writing.fallbackChain[0] expect(primary.model).toBe("gemini-3-flash") @@ -453,6 +459,10 @@ describe("CATEGORY_MODEL_REQUIREMENTS", () => { const third = writing.fallbackChain[2] expect(third.model).toBe("claude-sonnet-4-6") expect(third.providers[0]).toBe("anthropic") + + const fourth = writing.fallbackChain[3] + expect(fourth.model).toBe("minimax-m2.7") + expect(fourth.providers[0]).toBe("opencode-go") }) test("all 8 categories have valid fallbackChain arrays", () => { diff --git a/src/shared/model-requirements.ts b/src/shared/model-requirements.ts index 16f7e78c9..232e45444 100644 --- a/src/shared/model-requirements.ts +++ b/src/shared/model-requirements.ts @@ -72,8 +72,8 @@ export const AGENT_MODEL_REQUIREMENTS: Record = { }, librarian: { fallbackChain: [ - { providers: ["opencode-go"], model: "minimax-m2.5" }, - { providers: ["opencode"], model: "minimax-m2.5-free" }, + { providers: ["opencode-go"], model: "minimax-m2.7" }, + { providers: ["opencode"], model: "minimax-m2.7-highspeed" }, { providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" }, { providers: ["opencode"], model: "gpt-5-nano" }, ], @@ -81,8 +81,8 @@ export const AGENT_MODEL_REQUIREMENTS: Record = { explore: { fallbackChain: [ { providers: ["github-copilot"], model: "grok-code-fast-1" }, - { providers: ["opencode-go"], model: "minimax-m2.5" }, - { providers: ["opencode"], model: "minimax-m2.5-free" }, + { providers: ["opencode-go"], model: "minimax-m2.7-highspeed" }, + { providers: ["opencode"], model: "minimax-m2.7" }, { providers: ["anthropic", "opencode"], model: "claude-haiku-4-5" }, { providers: ["opencode"], model: "gpt-5-nano" }, ], @@ -159,6 +159,7 @@ export const AGENT_MODEL_REQUIREMENTS: Record = { model: "gpt-5.4", variant: "medium", }, + { providers: ["opencode-go"], model: "minimax-m2.7" }, ], }, "sisyphus-junior": { @@ -170,6 +171,7 @@ export const AGENT_MODEL_REQUIREMENTS: Record = { model: "gpt-5.4", variant: "medium", }, + { providers: ["opencode-go"], model: "minimax-m2.7" }, { providers: ["opencode"], model: "big-pickle" }, ], }, @@ -263,7 +265,7 @@ export const CATEGORY_MODEL_REQUIREMENTS: Record = { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash", }, - { providers: ["opencode-go"], model: "minimax-m2.5" }, + { providers: ["opencode-go"], model: "minimax-m2.7" }, { providers: ["opencode"], model: "gpt-5-nano" }, ], }, @@ -283,6 +285,7 @@ export const CATEGORY_MODEL_REQUIREMENTS: Record = { providers: ["google", "github-copilot", "opencode"], model: "gemini-3-flash", }, + { providers: ["opencode-go"], model: "minimax-m2.7" }, ], }, "unspecified-high": { @@ -325,6 +328,7 @@ export const CATEGORY_MODEL_REQUIREMENTS: Record = { providers: ["anthropic", "github-copilot", "opencode"], model: "claude-sonnet-4-6", }, + { providers: ["opencode-go"], model: "minimax-m2.7" }, ], }, };