A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io
Rust ai-toolsclaude-codecodexdeepseek-harnessdesktop-appgrokgrokbuildhermeskimi-codemcpopen-sourceopencodepiprovider-managementrustskillsskills-managementtauriwsl-support
feat(minimax): add MiniMax-M4 to the official MiniMax presets (#10285)
SaladDay7c67cd13c1b8
diff --git a/src/config/claudeDesktopProviderPresets.ts b/src/config/claudeDesktopProviderPresets.tsindex dfc15faf4..dcfcb4bfc 100644--- a/src/config/claudeDesktopProviderPresets.ts+++ b/src/config/claudeDesktopProviderPresets.ts@@ -1804,21 +1804,12 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [baseUrl: "https://api.minimax.cn/anthropic",mode: "proxy",apiFormat: "anthropic",- modelRoutes: [- ...brandedRoutes(- "MiniMax-M3.1-Flash",- "MiniMax-M3.1-Flash",- "MiniMax-M3.1-Flash",- true,- ),- // extra route (fable slot) so M3 stays selectable; defaults stay on M3.1- {- routeId: CLAUDE_DESKTOP_ROLE_ROUTE_IDS.fable,- upstreamModel: "MiniMax-M3",- labelOverride: "MiniMax-M3",- supports1m: true,- },- ],+ modelRoutes: brandedRoutes(+ "MiniMax-M4",+ "MiniMax-M4",+ "MiniMax-M3.1-Flash",+ true,+ ),theme: {backgroundColor: "#f64551",textColor: "#FFFFFF",@@ -1836,21 +1827,12 @@ export const claudeDesktopProviderPresets: ClaudeDesktopProviderPreset[] = [baseUrl: "https://api.minimax.io/anthropic",mode: "proxy",apiFormat: "anthropic",- modelRoutes: [- ...brandedRoutes(- "MiniMax-M3.1-Flash",- "MiniMax-M3.1-Flash",- "MiniMax-M3.1-Flash",- true,- ),- // extra route (fable slot) so M3 stays selectable; defaults stay on M3.1- {- routeId: CLAUDE_DESKTOP_ROLE_ROUTE_IDS.fable,- upstreamModel: "MiniMax-M3",- labelOverride: "MiniMax-M3",- supports1m: true,- },- ],+ modelRoutes: brandedRoutes(+ "MiniMax-M4",+ "MiniMax-M4",+ "MiniMax-M3.1-Flash",+ true,+ ),theme: {backgroundColor: "#f64551",textColor: "#FFFFFF",diff --git a/src/config/claudeProviderPresets.ts b/src/config/claudeProviderPresets.tsindex 3d31a0197..23284e618 100644--- a/src/config/claudeProviderPresets.ts+++ b/src/config/claudeProviderPresets.ts@@ -1996,10 +1996,10 @@ export const providerPresets: ProviderPreset[] = [ANTHROPIC_BASE_URL: "https://api.minimax.cn/anthropic",ANTHROPIC_AUTH_TOKEN: "",CLAUDE_CODE_AUTO_COMPACT_WINDOW: "1000000",- ANTHROPIC_MODEL: "MiniMax-M3.1-Flash[1m]",- ANTHROPIC_DEFAULT_SONNET_MODEL: "MiniMax-M3.1-Flash[1m]",- // M3 stays selectable as Opus; a role slot also works through the local route- ANTHROPIC_DEFAULT_OPUS_MODEL: "MiniMax-M3[1m]",+ ANTHROPIC_MODEL: "MiniMax-M4[1m]",+ ANTHROPIC_DEFAULT_SONNET_MODEL: "MiniMax-M4[1m]",+ // M4 is the big model (Sonnet/Opus); M3.1-Flash is the small model (Haiku)+ ANTHROPIC_DEFAULT_OPUS_MODEL: "MiniMax-M4[1m]",ANTHROPIC_DEFAULT_HAIKU_MODEL: "MiniMax-M3.1-Flash[1m]",},},@@ -2022,10 +2022,10 @@ export const providerPresets: ProviderPreset[] = [ANTHROPIC_BASE_URL: "https://api.minimax.io/anthropic",ANTHROPIC_AUTH_TOKEN: "",CLAUDE_CODE_AUTO_COMPACT_WINDOW: "1000000",- ANTHROPIC_MODEL: "MiniMax-M3.1-Flash[1m]",- ANTHROPIC_DEFAULT_SONNET_MODEL: "MiniMax-M3.1-Flash[1m]",- // M3 stays selectable as Opus; a role slot also works through the local route- ANTHROPIC_DEFAULT_OPUS_MODEL: "MiniMax-M3[1m]",+ ANTHROPIC_MODEL: "MiniMax-M4[1m]",+ ANTHROPIC_DEFAULT_SONNET_MODEL: "MiniMax-M4[1m]",+ // M4 is the big model (Sonnet/Opus); M3.1-Flash is the small model (Haiku)+ ANTHROPIC_DEFAULT_OPUS_MODEL: "MiniMax-M4[1m]",ANTHROPIC_DEFAULT_HAIKU_MODEL: "MiniMax-M3.1-Flash[1m]",},},diff --git a/src/config/codexProviderPresets.ts b/src/config/codexProviderPresets.tsindex 0a9c330db..47edb759b 100644--- a/src/config/codexProviderPresets.ts+++ b/src/config/codexProviderPresets.ts@@ -74,6 +74,7 @@ export function generateThirdPartyConfig(// requires_openai_auth = true 会被后端 keyless 安全闸拒绝切换// (provider.codex.config.official_auth_fallback)。requiresOpenAiAuth?: boolean;+ reasoningEffort?: string;},): string {const tomlString = (value: string) => JSON.stringify(value);@@ -81,7 +82,7 @@ export function generateThirdPartyConfig(return `model_provider = "custom"model = ${tomlString(modelName)}-model_reasoning_effort = "high"+model_reasoning_effort = ${tomlString(options?.reasoningEffort ?? "high")}[model_providers.custom]name = ${tomlString(providerName)}@@ -185,24 +186,25 @@ const streamLakeModels = (): CodexCatalogModel[] =>const miniMaxModels = (): CodexCatalogModel[] =>modelCatalog([{- model: "MiniMax-M3.1-Flash",- displayName: "MiniMax-M3.1-Flash",+ model: "MiniMax-M4",+ displayName: "MiniMax-M4",contextWindow: 1000000,reasoningLevels: ["low", "medium", "high", "xhigh", "max"],+ defaultReasoningLevel: "max",supportsParallelToolCalls: true,inputModalities: ["text", "image"],baseInstructions:- "You are Codex, a coding agent based on MiniMax-M3.1-Flash. You and the user share the same workspace and collaborate to achieve the user's goals.",+ "You are Codex, a coding agent based on MiniMax-M4. You and the user share the same workspace and collaborate to achieve the user's goals.",},{- model: "MiniMax-M3",- displayName: "MiniMax-M3",+ model: "MiniMax-M3.1-Flash",+ displayName: "MiniMax-M3.1-Flash",contextWindow: 1000000,- reasoningLevels: ["none", "high"],+ reasoningLevels: ["low", "medium", "high", "xhigh", "max"],supportsParallelToolCalls: true,inputModalities: ["text", "image"],baseInstructions:- "You are Codex, a coding agent based on MiniMax-M3. You and the user share the same workspace and collaborate to achieve the user's goals.",+ "You are Codex, a coding agent based on MiniMax-M3.1-Flash. You and the user share the same workspace and collaborate to achieve the user's goals.",},]);@@ -3224,16 +3226,16 @@ requires_openai_auth = true`,config: generateThirdPartyConfig("minimax","https://api.minimax.cn/v1",- "MiniMax-M3.1-Flash",+ "MiniMax-M4",+ { reasoningEffort: "max" },),endpointCandidates: ["https://api.minimax.cn/v1"],// MiniMax 官方 API 参考已列 /v1/responses 为正式端点(CN/intl 双区,POST /v1/responses),原生 Responses,无需路由接管转换apiFormat: "openai_responses",// 官方 Codex catalog(platform.minimax.cn/docs/token-plan/codex):// shell_command 编辑、并行工具、文本+图像,不声明 freeform apply_patch。- // 档位照抄官方 catalog:none/high(M3 的 effort 是思考开关,minimal/low/medium- // 端点接受但与 high 行为完全等价,不给假差异档)。与模板默认一致故 Codex 侧- // 零行为变化,显式声明只为表单可见("未设置"误导性更大,Jason 2026-08-15 拍板)+ // 官方现只提供 M4(默认)和 M3.1-Flash。两者思考不可关,effort 为 low..max+ //(none 会被拒绝)。显式声明只为表单可见。modelCatalog: miniMaxModels(),category: "cn_official",theme: {@@ -3253,16 +3255,16 @@ requires_openai_auth = true`,config: generateThirdPartyConfig("minimax_en","https://api.minimax.io/v1",- "MiniMax-M3.1-Flash",+ "MiniMax-M4",+ { reasoningEffort: "max" },),endpointCandidates: ["https://api.minimax.io/v1"],// MiniMax 官方 API 参考已列 /v1/responses 为正式端点(CN/intl 双区,POST /v1/responses),原生 Responses,无需路由接管转换apiFormat: "openai_responses",// 官方 Codex catalog(platform.minimax.io/docs/token-plan/codex):// shell_command 编辑、并行工具、文本+图像,不声明 freeform apply_patch。- // 档位照抄官方 catalog:none/high(M3 的 effort 是思考开关,minimal/low/medium- // 端点接受但与 high 行为完全等价,不给假差异档)。与模板默认一致故 Codex 侧- // 零行为变化,显式声明只为表单可见("未设置"误导性更大,Jason 2026-08-15 拍板)+ // 官方现只提供 M4(默认)和 M3.1-Flash。两者思考不可关,effort 为 low..max+ //(none 会被拒绝)。显式声明只为表单可见。modelCatalog: miniMaxModels(),category: "cn_official",theme: {diff --git a/src/config/hermesProviderPresets.ts b/src/config/hermesProviderPresets.tsindex 9a05de6b8..15889f75e 100644--- a/src/config/hermesProviderPresets.ts+++ b/src/config/hermesProviderPresets.ts@@ -242,12 +242,12 @@ const qwenAiPlatformModels = (): HermesModel[] => [];const miniMaxModels = (): HermesModel[] => [+ { id: "MiniMax-M4", name: "MiniMax M4", supports_vision: true },{id: "MiniMax-M3.1-Flash",name: "MiniMax M3.1 Flash",supports_vision: true,},- { id: "MiniMax-M3", name: "MiniMax M3" },];export const hermesProviderPresets: HermesProviderPreset[] = [@@ -2395,15 +2395,15 @@ export const hermesProviderPresets: HermesProviderPreset[] = [api_key: "",api_mode: "chat_completions",models: miniMaxModels(),- // M3.1 can't disable thinking; Hermes' title request sends reasoning_effort:none- title_generation_model: "MiniMax-M3",+ // Title generation uses the small model+ title_generation_model: "MiniMax-M3.1-Flash",},category: "cn_official",theme: { backgroundColor: "#f64551", textColor: "#FFFFFF" },icon: "minimax",iconColor: "#FF6B6B",suggestedDefaults: {- model: { default: "MiniMax-M3.1-Flash", provider: "cc-switch-minimax" },+ model: { default: "MiniMax-M4", provider: "cc-switch-minimax" },},},{@@ -2419,8 +2419,8 @@ export const hermesProviderPresets: HermesProviderPreset[] = [api_key: "",api_mode: "chat_completions",models: miniMaxModels(),- // M3.1 can't disable thinking; Hermes' title request sends reasoning_effort:none- title_generation_model: "MiniMax-M3",+ // Title generation uses the small model+ title_generation_model: "MiniMax-M3.1-Flash",},category: "cn_official",theme: { backgroundColor: "#f64551", textColor: "#FFFFFF" },@@ -2428,7 +2428,7 @@ export const hermesProviderPresets: HermesProviderPreset[] = [iconColor: "#FF6B6B",suggestedDefaults: {model: {- default: "MiniMax-M3.1-Flash",+ default: "MiniMax-M4",provider: "cc-switch-minimax-en",},},diff --git a/src/config/openclawProviderPresets.ts b/src/config/openclawProviderPresets.tsindex 22be15b38..f8b087919 100644--- a/src/config/openclawProviderPresets.ts+++ b/src/config/openclawProviderPresets.ts@@ -8,6 +8,7 @@ import type {ProviderCategory,OpenClawProviderConfig,OpenClawDefaultModel,+ OpenClawModelCatalogEntry,} from "../types";import type { PresetTheme, TemplateValueConfig } from "./claudeProviderPresets";import type { PresetFamilyFields } from "./presetFamilies";@@ -17,7 +18,7 @@ export interface OpenClawSuggestedDefaults {/** Default model config to apply (agents.defaults.model) */model?: OpenClawDefaultModel;/** Model catalog entries to add (agents.defaults.models) */- modelCatalog?: Record<string, { alias?: string }>;+ modelCatalog?: Record<string, OpenClawModelCatalogEntry>;}export interface OpenClawProviderPreset extends PresetFamilyFields {@@ -585,26 +586,29 @@ const stepFunModels = (): NonNullable<OpenClawProviderConfig["models"]> => [const miniMaxModels = (): NonNullable<OpenClawProviderConfig["models"]> => [{- id: "MiniMax-M3.1-Flash",- name: "MiniMax M3.1 Flash",+ id: "MiniMax-M4",+ name: "MiniMax M4",reasoning: true,input: ["text", "image"],contextWindow: 1000000,maxTokens: 131072,- cost: { input: 0.15, output: 0.6, cacheRead: 0.015, cacheWrite: 0 },compat: {supportsReasoningEffort: true,supportedReasoningEfforts: ["low", "medium", "high", "xhigh", "max"],},},{- id: "MiniMax-M3",- name: "MiniMax M3",+ id: "MiniMax-M3.1-Flash",+ name: "MiniMax M3.1 Flash",reasoning: true,input: ["text", "image"],contextWindow: 1000000,maxTokens: 131072,- cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0 },+ cost: { input: 0.15, output: 0.6, cacheRead: 0.015, cacheWrite: 0 },+ compat: {+ supportsReasoningEffort: true,+ supportedReasoningEfforts: ["low", "medium", "high", "xhigh", "max"],+ },},];@@ -4169,9 +4173,12 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [},},suggestedDefaults: {- model: { primary: "minimax/MiniMax-M3.1-Flash" },+ model: { primary: "minimax/MiniMax-M4" },modelCatalog: {- "minimax/MiniMax-M3.1-Flash": { alias: "MiniMax" },+ "minimax/MiniMax-M4": {+ alias: "MiniMax",+ params: { thinking: "max" },+ },},},},@@ -4202,9 +4209,12 @@ export const openclawProviderPresets: OpenClawProviderPreset[] = [},},suggestedDefaults: {- model: { primary: "minimax-en/MiniMax-M3.1-Flash" },+ model: { primary: "minimax-en/MiniMax-M4" },modelCatalog: {- "minimax-en/MiniMax-M3.1-Flash": { alias: "MiniMax" },+ "minimax-en/MiniMax-M4": {+ alias: "MiniMax",+ params: { thinking: "max" },+ },},},},diff --git a/src/config/opencodeProviderPresets.ts b/src/config/opencodeProviderPresets.tsindex 49da42728..0ff09f032 100644--- a/src/config/opencodeProviderPresets.ts+++ b/src/config/opencodeProviderPresets.ts@@ -55,19 +55,20 @@ export const OPENCODE_PRESET_MODEL_VARIANTS: Record<> = {"@ai-sdk/openai-compatible": [{- id: "MiniMax-M3.1-Flash",- name: "MiniMax M3.1 Flash",+ id: "MiniMax-M4",+ name: "MiniMax M4",contextLimit: 1000000,outputLimit: 131072,modalities: { input: ["text", "image"], output: ["text"] },variants: MINIMAX_M31_VARIANTS,},{- id: "MiniMax-M3",- name: "MiniMax M3",+ id: "MiniMax-M3.1-Flash",+ name: "MiniMax M3.1 Flash",contextLimit: 1000000,outputLimit: 131072,modalities: { input: ["text", "image"], output: ["text"] },+ variants: MINIMAX_M31_VARIANTS,},{id: "glm-5.1",@@ -620,18 +621,19 @@ const streamLakeModels = (): OpenCodeProviderConfig["models"] => ({});const miniMaxModels = (): OpenCodeProviderConfig["models"] => ({- "MiniMax-M3.1-Flash": {- name: "MiniMax M3.1 Flash",+ "MiniMax-M4": {+ name: "MiniMax M4",reasoning: true,limit: { context: 1000000, output: 131072 },modalities: { input: ["text", "image"], output: ["text"] },variants: MINIMAX_M31_VARIANTS,},- "MiniMax-M3": {- name: "MiniMax M3",+ "MiniMax-M3.1-Flash": {+ name: "MiniMax M3.1 Flash",reasoning: true,limit: { context: 1000000, output: 131072 },modalities: { input: ["text", "image"], output: ["text"] },+ variants: MINIMAX_M31_VARIANTS,},});diff --git a/src/config/piModelCatalog.ts b/src/config/piModelCatalog.tsindex 48624ec84..a0ab03108 100644--- a/src/config/piModelCatalog.ts+++ b/src/config/piModelCatalog.ts@@ -282,6 +282,15 @@ export const piModelCatalog = {maxTokens: 128_000,},},+ "minimax/minimax-m4": {+ capabilities: {+ name: "MiniMax-M4",+ reasoning: true,+ input: ["text", "image"],+ contextWindow: 1_000_000,+ maxTokens: 131_072,+ },+ },// 2026-11-08 按 Pi 1.5.0 内置 mistral 目录(@earendil-works/pi-ai// providers/data/mistral.json)核对窗口与最大输出"mistral/mistral-large-4": {diff --git a/src/config/piProviderPresets.ts b/src/config/piProviderPresets.tsindex c82608ee4..10d2164f0 100644--- a/src/config/piProviderPresets.ts+++ b/src/config/piProviderPresets.ts@@ -278,15 +278,15 @@ const streamLakeModels = (): PiPresetModel[] => [];const miniMaxModels = (): PiPresetModel[] => [+ piModel("minimax/minimax-m4", {+ id: "MiniMax-M4",+ thinkingProfile: "minimaxM31",+ }),piModel("minimax/minimax-m3.1-flash", {id: "MiniMax-M3.1-Flash",maxTokens: 131072,thinkingProfile: "minimaxM31",}),- piModel("minimax/minimax-m3", {- id: "MiniMax-M3",- maxTokens: 131072,- }),];// Named after the lineup, not a provider: presets that sell the same modelsdiff --git a/src/config/zcodeProviderPresets.ts b/src/config/zcodeProviderPresets.tsindex 4a117a23f..d546b087e 100644--- a/src/config/zcodeProviderPresets.ts+++ b/src/config/zcodeProviderPresets.ts@@ -171,12 +171,12 @@ export const zcodeProviderPresets: ZCodeProviderPreset[] = [enabled: true,source: "custom",options: {- baseURL: "https://api.minimaxi.com/anthropic",+ baseURL: "https://api.minimax.cn/anthropic",apiKey: "",},models: {+ "MiniMax-M4": { name: "MiniMax M4" },"MiniMax-M3.1-Flash": { name: "MiniMax M3.1 Flash" },- "MiniMax-M3": { name: "MiniMax M3" },},},category: "cn_official",diff --git a/src/types.ts b/src/types.tsindex 4a23dc5fa..224ec93fa 100644--- a/src/types.ts+++ b/src/types.ts@@ -1027,6 +1027,7 @@ export interface OpenClawDefaultModel {// OpenClaw 模型目录条目(agents.defaults.models 中的值)export interface OpenClawModelCatalogEntry {alias?: string;+ params?: { thinking?: string };}export interface OpenClawHealthWarning {diff --git a/tests/components/McodeProviderForm.test.tsx b/tests/components/McodeProviderForm.test.tsxindex 17eaa6dc5..c66d34d4f 100644--- a/tests/components/McodeProviderForm.test.tsx+++ b/tests/components/McodeProviderForm.test.tsx@@ -202,7 +202,9 @@ describe("McodeProviderForm", () => {expect(saved.api).toBe("openai-completions");expect(saved.options.apiKey).toBe("test-key");expect(saved).not.toHaveProperty("npm");- expect(saved.models).toHaveProperty("MiniMax-M3");+ expect(saved.models).toHaveProperty("MiniMax-M4");+ expect(saved.models).toHaveProperty("MiniMax-M3.1-Flash");+ expect(saved.models).not.toHaveProperty("MiniMax-M3");expect(submit.mock.calls[0][0].providerKey).toBe("cc-switch-mini-max");});@@ -406,7 +408,10 @@ describe("McodeProviderForm", () => {expect(mcode.settingsConfig.options.baseURL).toBe(pi.settingsConfig.baseUrl,);- expect(Object.keys(mcode.settingsConfig.models)).toContain("MiniMax-M3");+ expect(Object.keys(mcode.settingsConfig.models)).toEqual([+ "MiniMax-M4",+ "MiniMax-M3.1-Flash",+ ]);expect(mcode.settingsConfig).not.toHaveProperty("compat");expect(pi.settingsConfig.models).toBeInstanceOf(Array);expect(diff --git a/tests/config/codexChatProviderPresets.test.ts b/tests/config/codexChatProviderPresets.test.tsindex bc7002244..725c1c581 100644--- a/tests/config/codexChatProviderPresets.test.ts+++ b/tests/config/codexChatProviderPresets.test.ts@@ -270,8 +270,8 @@ describe("Codex Chat provider presets", () => {{baseUrl: "https://api.minimax.cn/v1",contextWindows: {- "MiniMax-M3": 1000000,"MiniMax-M3.1-Flash": 1000000,+ "MiniMax-M4": 1000000,},},],@@ -279,8 +279,8 @@ describe("Codex Chat provider presets", () => {"MiniMax en",{contextWindows: {- "MiniMax-M3": 1000000,"MiniMax-M3.1-Flash": 1000000,+ "MiniMax-M4": 1000000,},},],diff --git a/tests/config/codexReasoningLevelPresets.test.ts b/tests/config/codexReasoningLevelPresets.test.tsindex 16e73594f..e64f9eea2 100644--- a/tests/config/codexReasoningLevelPresets.test.ts+++ b/tests/config/codexReasoningLevelPresets.test.ts@@ -96,19 +96,24 @@ describe("Codex preset pre-filled reasoning levels", () => {// DeepSeek 直连照抄官方 catalog 镜像(Jason 2026-08-15 拍板:表单可见性// 优先,接受快照过时风险——官方目录变更时须同步)["DeepSeek", "deepseek-flash", ["low", "high", "max"]],- // MiniMax-M3 官方 catalog=none/high;M3.1 Flash 思考不可关,实测 low–max 可用、none 报 2013;MiMo 2026-09-23 官方目录为四档、默认 low。- ["MiniMax", "MiniMax-M3", ["none", "high"]],+ // 官方 MiniMax 现只有 M4 和 M3.1-Flash,思考不可关,effort 为 low–max,none 报 2013;MiMo 2026-09-23 官方目录为四档、默认 low。["MiniMax","MiniMax-M3.1-Flash",["low", "medium", "high", "xhigh", "max"],],- ["MiniMax en", "MiniMax-M3", ["none", "high"]],+ ["MiniMax", "MiniMax-M4", ["low", "medium", "high", "xhigh", "max"], "max"],["MiniMax en","MiniMax-M3.1-Flash",["low", "medium", "high", "xhigh", "max"],],+ [+ "MiniMax en",+ "MiniMax-M4",+ ["low", "medium", "high", "xhigh", "max"],+ "max",+ ],["Xiaomi MiMo", "mimo-v2.6-pro", ["none", "low", "medium", "high"], "low"],["Xiaomi MiMo",