diff --git a/docs/providers/minimax.md b/docs/providers/minimax.md index f060c637de8..879b6473c5c 100644 --- a/docs/providers/minimax.md +++ b/docs/providers/minimax.md @@ -1,5 +1,5 @@ --- -summary: "Use MiniMax M2.5 in OpenClaw" +summary: "Use MiniMax M3 in OpenClaw" read_when: - You want MiniMax models in OpenClaw - You need MiniMax setup guidance @@ -8,30 +8,18 @@ title: "MiniMax" # MiniMax -MiniMax is an AI company that builds the **M2/M2.5** model family. The current -coding-focused release is **MiniMax M2.5** (December 23, 2025), built for -real-world complex tasks. +OpenClaw's MiniMax provider defaults to **MiniMax M3**, the latest generation +reasoning model with a 512K-token context window and image input support. -Source: [MiniMax M2.5 release note](https://www.minimax.io/news/minimax-m25) +Source: [MiniMax](https://www.minimax.io) -## Model overview (M2.5) +## Model overview -MiniMax highlights these improvements in M2.5: +OpenClaw ships the following MiniMax hosted chat models: -- Stronger **multi-language coding** (Rust, Java, Go, C++, Kotlin, Objective-C, TS/JS). -- Better **web/app development** and aesthetic output quality (including native mobile). -- Improved **composite instruction** handling for office-style workflows, building on - interleaved thinking and integrated constraint execution. -- **More concise responses** with lower token usage and faster iteration loops. -- Stronger **tool/agent framework** compatibility and context management (Claude Code, - Droid/Factory AI, Cline, Kilo Code, Roo Code, BlackBox). -- Higher-quality **dialogue and technical writing** outputs. - -## MiniMax M2.5 vs MiniMax M2.5 Highspeed - -- **Speed:** `MiniMax-M2.5-highspeed` is the official fast tier in MiniMax docs. -- **Cost:** MiniMax pricing lists the same input cost and a higher output cost for highspeed. -- **Current model IDs:** use `MiniMax-M2.5` or `MiniMax-M2.5-highspeed`. +- **`MiniMax-M3`** (default) — latest generation, 512K context, image input. +- **`MiniMax-M2.7`** — previous generation, 200K-token context, text input. +- **`MiniMax-M2.7-highspeed`** — faster M2.7 tier, 200K-token context, text input. ## Choose a setup @@ -54,7 +42,7 @@ You will be prompted to select an endpoint: See [MiniMax OAuth plugin README](https://github.com/openclaw/openclaw/tree/main/extensions/minimax-portal-auth) for details. -### MiniMax M2.5 (API key) +### MiniMax M3 (API key) **Best for:** hosted MiniMax with Anthropic-compatible API. @@ -62,12 +50,12 @@ Configure via CLI: - Run `openclaw configure` - Select **Model/auth** -- Choose **MiniMax M2.5** +- Choose **MiniMax M3** ```json5 { env: { MINIMAX_API_KEY: "sk-..." }, - agents: { defaults: { model: { primary: "minimax/MiniMax-M2.5" } } }, + agents: { defaults: { model: { primary: "minimax/MiniMax-M3" } } }, models: { mode: "merge", providers: { @@ -77,22 +65,22 @@ Configure via CLI: api: "anthropic-messages", models: [ { - id: "MiniMax-M2.5", - name: "MiniMax M2.5", + id: "MiniMax-M3", + name: "MiniMax M3", reasoning: true, - input: ["text"], - cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.12 }, - contextWindow: 200000, - maxTokens: 8192, + input: ["text", "image"], + cost: { input: 0.6, output: 2.4, cacheRead: 0.12, cacheWrite: 0 }, + contextWindow: 512_000, + maxTokens: 131072, }, { - id: "MiniMax-M2.5-highspeed", - name: "MiniMax M2.5 Highspeed", + id: "MiniMax-M2.7", + name: "MiniMax M2.7", reasoning: true, input: ["text"], - cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.12 }, + cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0.375 }, contextWindow: 200000, - maxTokens: 8192, + maxTokens: 131072, }, ], }, @@ -101,9 +89,9 @@ Configure via CLI: } ``` -### MiniMax M2.5 as fallback (example) +### MiniMax M3 as fallback (example) -**Best for:** keep your strongest latest-generation model as primary, fail over to MiniMax M2.5. +**Best for:** keep your strongest latest-generation model as primary, fail over to MiniMax M3. Example below uses Opus as a concrete primary; swap to your preferred latest-gen primary model. ```json5 @@ -113,11 +101,11 @@ Example below uses Opus as a concrete primary; swap to your preferred latest-gen defaults: { models: { "anthropic/claude-opus-4-6": { alias: "primary" }, - "minimax/MiniMax-M2.5": { alias: "minimax" }, + "minimax/MiniMax-M3": { alias: "minimax" }, }, model: { primary: "anthropic/claude-opus-4-6", - fallbacks: ["minimax/MiniMax-M2.5"], + fallbacks: ["minimax/MiniMax-M3"], }, }, }, @@ -127,7 +115,7 @@ Example below uses Opus as a concrete primary; swap to your preferred latest-gen ### Optional: Local via LM Studio (manual) **Best for:** local inference with LM Studio. -We have seen strong results with MiniMax M2.5 on powerful hardware (e.g. a +We have seen strong results with MiniMax on powerful hardware (e.g. a desktop/server) using LM Studio's local server. Configure manually via `openclaw.json`: @@ -136,8 +124,8 @@ Configure manually via `openclaw.json`: { agents: { defaults: { - model: { primary: "lmstudio/minimax-m2.5-gs32" }, - models: { "lmstudio/minimax-m2.5-gs32": { alias: "Minimax" } }, + model: { primary: "lmstudio/minimax-m3-gs32" }, + models: { "lmstudio/minimax-m3-gs32": { alias: "Minimax" } }, }, }, models: { @@ -149,8 +137,8 @@ Configure manually via `openclaw.json`: api: "openai-responses", models: [ { - id: "minimax-m2.5-gs32", - name: "MiniMax M2.5 GS32", + id: "minimax-m3-gs32", + name: "MiniMax M3 GS32", reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, @@ -170,7 +158,7 @@ Use the interactive config wizard to set MiniMax without editing JSON: 1. Run `openclaw configure`. 2. Select **Model/auth**. -3. Choose **MiniMax M2.5**. +3. Choose **MiniMax M3**. 4. Pick your default model when prompted. ## Configuration options @@ -185,30 +173,31 @@ Use the interactive config wizard to set MiniMax without editing JSON: ## Notes - Model refs are `minimax/`. -- Recommended model IDs: `MiniMax-M2.5` and `MiniMax-M2.5-highspeed`. +- Recommended model IDs: `MiniMax-M3` (default), `MiniMax-M2.7`, and `MiniMax-M2.7-highspeed`. - Coding Plan usage API: `https://api.minimaxi.com/v1/api/openplatform/coding_plan/remains` (requires a coding plan key). - Update pricing values in `models.json` if you need exact cost tracking. - Referral link for MiniMax Coding Plan (10% off): [https://platform.minimax.io/subscribe/coding-plan?code=DbXJTRClnb&source=link](https://platform.minimax.io/subscribe/coding-plan?code=DbXJTRClnb&source=link) - See [/concepts/model-providers](/concepts/model-providers) for provider rules. -- Use `openclaw models list` and `openclaw models set minimax/MiniMax-M2.5` to switch. +- Use `openclaw models list` and `openclaw models set minimax/MiniMax-M3` to switch. ## Troubleshooting -### “Unknown model: minimax/MiniMax-M2.5” +### "Unknown model: minimax/MiniMax-M3" -This usually means the **MiniMax provider isn’t configured** (no provider entry +This usually means the **MiniMax provider isn't configured** (no provider entry and no MiniMax auth profile/env key found). A fix for this detection is in **2026.1.12** (unreleased at the time of writing). Fix by: - Upgrading to **2026.1.12** (or run from source `main`), then restarting the gateway. -- Running `openclaw configure` and selecting **MiniMax M2.5**, or +- Running `openclaw configure` and selecting **MiniMax M3**, or - Adding the `models.providers.minimax` block manually, or - Setting `MINIMAX_API_KEY` (or a MiniMax auth profile) so the provider can be injected. -Make sure the model id is **case‑sensitive**: +Make sure the model id is **case-sensitive**: -- `minimax/MiniMax-M2.5` -- `minimax/MiniMax-M2.5-highspeed` +- `minimax/MiniMax-M3` +- `minimax/MiniMax-M2.7` +- `minimax/MiniMax-M2.7-highspeed` Then recheck with: diff --git a/docs/zh-CN/providers/minimax.md b/docs/zh-CN/providers/minimax.md index acaa6f8fe55..06ec70528fb 100644 --- a/docs/zh-CN/providers/minimax.md +++ b/docs/zh-CN/providers/minimax.md @@ -2,7 +2,7 @@ read_when: - 你想在 OpenClaw 中使用 MiniMax 模型 - 你需要 MiniMax 设置指南 -summary: 在 OpenClaw 中使用 MiniMax M2.1 +summary: 在 OpenClaw 中使用 MiniMax M3 title: MiniMax x-i18n: generated_at: "2026-02-03T10:08:52Z" @@ -15,26 +15,17 @@ x-i18n: # MiniMax -MiniMax 是一家构建 **M2/M2.1** 模型系列的 AI 公司。当前面向编程的版本是 **MiniMax M2.1**(2025 年 12 月 23 日),专为现实世界的复杂任务而构建。 +OpenClaw 的 MiniMax 提供商默认使用 **MiniMax M3**,这是最新一代的推理模型,拥有 100 万 token 上下文窗口和图片输入支持。 -来源:[MiniMax M2.1 发布说明](https://www.minimax.io/news/minimax-m21) +来源:[MiniMax](https://www.minimax.io) -## 模型概述(M2.1) +## 模型概述 -MiniMax 强调 M2.1 的以下改进: +OpenClaw 内置以下 MiniMax 托管的聊天模型: -- 更强的**多语言编程**能力(Rust、Java、Go、C++、Kotlin、Objective-C、TS/JS)。 -- 更好的 **Web/应用开发**和美观输出质量(包括原生移动端)。 -- 改进的**复合指令**处理,适用于办公风格的工作流程,基于交错思考和集成约束执行。 -- **更简洁的响应**,更低的 token 使用量和更快的迭代循环。 -- 更强的**工具/智能体框架**兼容性和上下文管理(Claude Code、Droid/Factory AI、Cline、Kilo Code、Roo Code、BlackBox)。 -- 更高质量的**对话和技术写作**输出。 - -## MiniMax M2.1 vs MiniMax M2.1 Lightning - -- **速度:** Lightning 是 MiniMax 定价文档中的"快速"变体。 -- **成本:** 定价显示相同的输入成本,但 Lightning 的输出成本更高。 -- **编程计划路由:** Lightning 后端在 MiniMax 编程计划中不能直接使用。MiniMax 自动将大多数请求路由到 Lightning,但在流量高峰期会回退到常规 M2.1 后端。 +- **`MiniMax-M3`**(默认)— 最新一代,100 万 token 上下文,支持图片输入。 +- **`MiniMax-M2.7`** — 上一代,20 万 token 上下文,仅文本输入。 +- **`MiniMax-M2.7-highspeed`** — M2.7 的更快速版本,20 万 token 上下文,仅文本输入。 ## 选择设置方式 @@ -57,7 +48,7 @@ openclaw onboard --auth-choice minimax-portal 详情参见 [MiniMax OAuth 插件 README](https://github.com/openclaw/openclaw/tree/main/extensions/minimax-portal-auth)。 -### MiniMax M2.1(API 密钥) +### MiniMax M3(API 密钥) **适用于:** 使用 Anthropic 兼容 API 的托管 MiniMax。 @@ -65,12 +56,12 @@ openclaw onboard --auth-choice minimax-portal - 运行 `openclaw configure` - 选择 **Model/auth** -- 选择 **MiniMax M2.1** +- 选择 **MiniMax M3** ```json5 { env: { MINIMAX_API_KEY: "sk-..." }, - agents: { defaults: { model: { primary: "minimax/MiniMax-M2.1" } } }, + agents: { defaults: { model: { primary: "minimax/MiniMax-M3" } } }, models: { mode: "merge", providers: { @@ -80,13 +71,22 @@ openclaw onboard --auth-choice minimax-portal api: "anthropic-messages", models: [ { - id: "MiniMax-M2.1", - name: "MiniMax M2.1", - reasoning: false, + id: "MiniMax-M3", + name: "MiniMax M3", + reasoning: true, + input: ["text", "image"], + cost: { input: 0.6, output: 2.4, cacheRead: 0.12, cacheWrite: 0 }, + contextWindow: 512_000, + maxTokens: 131072, + }, + { + id: "MiniMax-M2.7", + name: "MiniMax M2.7", + reasoning: true, input: ["text"], - cost: { input: 15, output: 60, cacheRead: 2, cacheWrite: 10 }, + cost: { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0.375 }, contextWindow: 200000, - maxTokens: 8192, + maxTokens: 131072, }, ], }, @@ -95,9 +95,9 @@ openclaw onboard --auth-choice minimax-portal } ``` -### MiniMax M2.1 作为备用(Opus 为主) +### MiniMax M3 作为备用(Opus 为主) -**适用于:** 保持 Opus 4.5 为主模型,故障时切换到 MiniMax M2.1。 +**适用于:** 保持 Opus 4.5 为主模型,故障时切换到 MiniMax M3。 ```json5 { @@ -106,11 +106,11 @@ openclaw onboard --auth-choice minimax-portal defaults: { models: { "anthropic/claude-opus-4-5": { alias: "opus" }, - "minimax/MiniMax-M2.1": { alias: "minimax" }, + "minimax/MiniMax-M3": { alias: "minimax" }, }, model: { primary: "anthropic/claude-opus-4-5", - fallbacks: ["minimax/MiniMax-M2.1"], + fallbacks: ["minimax/MiniMax-M3"], }, }, }, @@ -120,7 +120,7 @@ openclaw onboard --auth-choice minimax-portal ### 可选:通过 LM Studio 本地运行(手动) **适用于:** 使用 LM Studio 进行本地推理。 -我们在强大硬件(例如台式机/服务器)上使用 LM Studio 的本地服务器运行 MiniMax M2.1 时看到了出色的效果。 +我们在强大硬件(例如台式机/服务器)上使用 LM Studio 的本地服务器运行 MiniMax 时看到了出色的效果。 通过 `openclaw.json` 手动配置: @@ -128,8 +128,8 @@ openclaw onboard --auth-choice minimax-portal { agents: { defaults: { - model: { primary: "lmstudio/minimax-m2.1-gs32" }, - models: { "lmstudio/minimax-m2.1-gs32": { alias: "Minimax" } }, + model: { primary: "lmstudio/minimax-m3-gs32" }, + models: { "lmstudio/minimax-m3-gs32": { alias: "Minimax" } }, }, }, models: { @@ -141,8 +141,8 @@ openclaw onboard --auth-choice minimax-portal api: "openai-responses", models: [ { - id: "minimax-m2.1-gs32", - name: "MiniMax M2.1 GS32", + id: "minimax-m3-gs32", + name: "MiniMax M3 GS32", reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, @@ -162,7 +162,7 @@ openclaw onboard --auth-choice minimax-portal 1. 运行 `openclaw configure`。 2. 选择 **Model/auth**。 -3. 选择 **MiniMax M2.1**。 +3. 选择 **MiniMax M3**。 4. 在提示时选择你的默认模型。 ## 配置选项 @@ -181,23 +181,24 @@ openclaw onboard --auth-choice minimax-portal - 如果需要精确的成本跟踪,请更新 `models.json` 中的定价值。 - MiniMax 编程计划推荐链接(9 折优惠):https://platform.minimax.io/subscribe/coding-plan?code=DbXJTRClnb&source=link - 参见 [/concepts/model-providers](/concepts/model-providers) 了解提供商规则。 -- 使用 `openclaw models list` 和 `openclaw models set minimax/MiniMax-M2.1` 切换模型。 +- 使用 `openclaw models list` 和 `openclaw models set minimax/MiniMax-M3` 切换模型。 ## 故障排除 -### "Unknown model: minimax/MiniMax-M2.1" +### "Unknown model: minimax/MiniMax-M3" 这通常意味着 **MiniMax 提供商未配置**(没有提供商条目,也没有找到 MiniMax 认证配置文件/环境变量密钥)。此检测的修复在 **2026.1.12** 中(撰写本文时尚未发布)。修复方法: - 升级到 **2026.1.12**(或从源码 `main` 分支运行),然后重启 Gateway 网关。 -- 运行 `openclaw configure` 并选择 **MiniMax M2.1**,或 +- 运行 `openclaw configure` 并选择 **MiniMax M3**,或 - 手动添加 `models.providers.minimax` 块,或 - 设置 `MINIMAX_API_KEY`(或 MiniMax 认证配置文件)以便注入提供商。 确保模型 id **区分大小写**: -- `minimax/MiniMax-M2.1` -- `minimax/MiniMax-M2.1-lightning` +- `minimax/MiniMax-M3` +- `minimax/MiniMax-M2.7` +- `minimax/MiniMax-M2.7-highspeed` 然后重新检查: diff --git a/extensions/minimax/index.ts b/extensions/minimax/index.ts index 61729c23eb8..d0986909305 100644 --- a/extensions/minimax/index.ts +++ b/extensions/minimax/index.ts @@ -131,6 +131,7 @@ function createOAuthHandler(region: MiniMaxRegion) { agents: { defaults: { models: { + [portalModelRef("MiniMax-M3")]: { alias: "minimax-m3" }, [portalModelRef("MiniMax-M2.7")]: { alias: "minimax-m2.7" }, [portalModelRef("MiniMax-M2.7-highspeed")]: { alias: "minimax-m2.7-highspeed", @@ -189,7 +190,7 @@ export default definePluginEntry({ choiceHint: "Global endpoint - api.minimax.io", groupId: "minimax", groupLabel: "MiniMax", - groupHint: "M2.7 (recommended)", + groupHint: "M3 (recommended)", }, }), createProviderApiKeyAuthMethod({ @@ -213,7 +214,7 @@ export default definePluginEntry({ choiceHint: "CN endpoint - api.minimaxi.com", groupId: "minimax", groupLabel: "MiniMax", - groupHint: "M2.7 (recommended)", + groupHint: "M3 (recommended)", }, }), ], @@ -255,7 +256,7 @@ export default definePluginEntry({ choiceHint: "Global endpoint - api.minimax.io", groupId: "minimax", groupLabel: "MiniMax", - groupHint: "M2.7 (recommended)", + groupHint: "M3 (recommended)", }, run: createOAuthHandler("global"), }, @@ -270,7 +271,7 @@ export default definePluginEntry({ choiceHint: "CN endpoint - api.minimaxi.com", groupId: "minimax", groupLabel: "MiniMax", - groupHint: "M2.7 (recommended)", + groupHint: "M3 (recommended)", }, run: createOAuthHandler("cn"), }, diff --git a/extensions/minimax/model-definitions.test.ts b/extensions/minimax/model-definitions.test.ts index ddc46187d4e..d4601ebbcac 100644 --- a/extensions/minimax/model-definitions.test.ts +++ b/extensions/minimax/model-definitions.test.ts @@ -9,18 +9,18 @@ import { } from "./model-definitions.js"; describe("minimax model definitions", () => { - it("uses M2.7 as default hosted model", () => { - expect(MINIMAX_HOSTED_MODEL_ID).toBe("MiniMax-M2.7"); + it("uses M3 as default hosted model", () => { + expect(MINIMAX_HOSTED_MODEL_ID).toBe("MiniMax-M3"); }); it("uses the higher upstream MiniMax context and token defaults", () => { expect(DEFAULT_MINIMAX_CONTEXT_WINDOW).toBe(204800); expect(DEFAULT_MINIMAX_MAX_TOKENS).toBe(131072); expect(MINIMAX_API_COST).toEqual({ - input: 0.3, - output: 1.2, - cacheRead: 0.06, - cacheWrite: 0.375, + input: 0.6, + output: 2.4, + cacheRead: 0.12, + cacheWrite: 0, }); }); diff --git a/extensions/minimax/model-definitions.ts b/extensions/minimax/model-definitions.ts index 718dea466d1..d93f49bdbf5 100644 --- a/extensions/minimax/model-definitions.ts +++ b/extensions/minimax/model-definitions.ts @@ -7,14 +7,27 @@ export const MINIMAX_CN_API_BASE_URL = "https://api.minimaxi.com/anthropic"; export const MINIMAX_HOSTED_MODEL_ID = MINIMAX_DEFAULT_MODEL_ID; export const MINIMAX_HOSTED_MODEL_REF = `minimax/${MINIMAX_HOSTED_MODEL_ID}`; export const DEFAULT_MINIMAX_CONTEXT_WINDOW = 204800; +export const MINIMAX_M3_CONTEXT_WINDOW = 512_000; export const DEFAULT_MINIMAX_MAX_TOKENS = 131072; export const MINIMAX_API_COST = { + input: 0.6, + output: 2.4, + cacheRead: 0.12, + cacheWrite: 0, +}; +export const MINIMAX_M27_API_COST = { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0.375, }; +export const MINIMAX_API_HIGHSPEED_COST = { + input: 0.6, + output: 2.4, + cacheRead: 0.06, + cacheWrite: 0.375, +}; export const MINIMAX_HOSTED_COST = { input: 0, output: 0, @@ -30,6 +43,16 @@ export const MINIMAX_LM_STUDIO_COST = { type MinimaxCatalogId = keyof typeof MINIMAX_TEXT_MODEL_CATALOG; +export function resolveMinimaxApiCost(modelId: string): ModelDefinitionConfig["cost"] { + if (modelId === "MiniMax-M2.7") { + return MINIMAX_M27_API_COST; + } + if (modelId === "MiniMax-M2.7-highspeed") { + return MINIMAX_API_HIGHSPEED_COST; + } + return MINIMAX_API_COST; +} + export function buildMinimaxModelDefinition(params: { id: string; name?: string; @@ -53,7 +76,7 @@ export function buildMinimaxModelDefinition(params: { export function buildMinimaxApiModelDefinition(modelId: string): ModelDefinitionConfig { return buildMinimaxModelDefinition({ id: modelId, - cost: MINIMAX_API_COST, + cost: resolveMinimaxApiCost(modelId), contextWindow: DEFAULT_MINIMAX_CONTEXT_WINDOW, maxTokens: DEFAULT_MINIMAX_MAX_TOKENS, }); diff --git a/extensions/minimax/openclaw.plugin.json b/extensions/minimax/openclaw.plugin.json index 8f0da029322..e71c319af66 100644 --- a/extensions/minimax/openclaw.plugin.json +++ b/extensions/minimax/openclaw.plugin.json @@ -17,7 +17,7 @@ "choiceHint": "Global endpoint - api.minimax.io", "groupId": "minimax", "groupLabel": "MiniMax", - "groupHint": "M2.7 (recommended)" + "groupHint": "M3 (recommended)" }, { "provider": "minimax", @@ -28,7 +28,7 @@ "choiceHint": "Global endpoint - api.minimax.io", "groupId": "minimax", "groupLabel": "MiniMax", - "groupHint": "M2.7 (recommended)", + "groupHint": "M3 (recommended)", "optionKey": "minimaxApiKey", "cliFlag": "--minimax-api-key", "cliOption": "--minimax-api-key ", @@ -42,7 +42,7 @@ "choiceHint": "CN endpoint - api.minimaxi.com", "groupId": "minimax", "groupLabel": "MiniMax", - "groupHint": "M2.7 (recommended)" + "groupHint": "M3 (recommended)" }, { "provider": "minimax", @@ -53,7 +53,7 @@ "choiceHint": "CN endpoint - api.minimaxi.com", "groupId": "minimax", "groupLabel": "MiniMax", - "groupHint": "M2.7 (recommended)", + "groupHint": "M3 (recommended)", "optionKey": "minimaxApiKey", "cliFlag": "--minimax-api-key", "cliOption": "--minimax-api-key ", diff --git a/extensions/minimax/provider-models.ts b/extensions/minimax/provider-models.ts index b4a026deda5..19b78c06958 100644 --- a/extensions/minimax/provider-models.ts +++ b/extensions/minimax/provider-models.ts @@ -1,11 +1,16 @@ import { matchesExactOrPrefix } from "openclaw/plugin-sdk/provider-model-shared"; -export const MINIMAX_DEFAULT_MODEL_ID = "MiniMax-M2.7"; +export const MINIMAX_DEFAULT_MODEL_ID = "MiniMax-M3"; export const MINIMAX_DEFAULT_MODEL_REF = `minimax/${MINIMAX_DEFAULT_MODEL_ID}`; -export const MINIMAX_TEXT_MODEL_ORDER = ["MiniMax-M2.7", "MiniMax-M2.7-highspeed"] as const; +export const MINIMAX_TEXT_MODEL_ORDER = [ + "MiniMax-M3", + "MiniMax-M2.7", + "MiniMax-M2.7-highspeed", +] as const; export const MINIMAX_TEXT_MODEL_CATALOG = { + "MiniMax-M3": { name: "MiniMax M3", reasoning: true }, "MiniMax-M2.7": { name: "MiniMax M2.7", reasoning: true }, "MiniMax-M2.7-highspeed": { name: "MiniMax M2.7 Highspeed", reasoning: true }, } as const; @@ -14,7 +19,7 @@ export const MINIMAX_TEXT_MODEL_REFS = MINIMAX_TEXT_MODEL_ORDER.map( (modelId) => `minimax/${modelId}`, ); -const MINIMAX_MODERN_MODEL_MATCHERS = ["minimax-m2.7"] as const; +const MINIMAX_MODERN_MODEL_MATCHERS = ["minimax-m3", "minimax-m2.7"] as const; export function isMiniMaxModernModelId(modelId: string): boolean { return matchesExactOrPrefix(modelId, MINIMAX_MODERN_MODEL_MATCHERS); diff --git a/minimax/index.ts b/minimax/index.ts index 61729c23eb8..d0986909305 100644 --- a/minimax/index.ts +++ b/minimax/index.ts @@ -131,6 +131,7 @@ function createOAuthHandler(region: MiniMaxRegion) { agents: { defaults: { models: { + [portalModelRef("MiniMax-M3")]: { alias: "minimax-m3" }, [portalModelRef("MiniMax-M2.7")]: { alias: "minimax-m2.7" }, [portalModelRef("MiniMax-M2.7-highspeed")]: { alias: "minimax-m2.7-highspeed", @@ -189,7 +190,7 @@ export default definePluginEntry({ choiceHint: "Global endpoint - api.minimax.io", groupId: "minimax", groupLabel: "MiniMax", - groupHint: "M2.7 (recommended)", + groupHint: "M3 (recommended)", }, }), createProviderApiKeyAuthMethod({ @@ -213,7 +214,7 @@ export default definePluginEntry({ choiceHint: "CN endpoint - api.minimaxi.com", groupId: "minimax", groupLabel: "MiniMax", - groupHint: "M2.7 (recommended)", + groupHint: "M3 (recommended)", }, }), ], @@ -255,7 +256,7 @@ export default definePluginEntry({ choiceHint: "Global endpoint - api.minimax.io", groupId: "minimax", groupLabel: "MiniMax", - groupHint: "M2.7 (recommended)", + groupHint: "M3 (recommended)", }, run: createOAuthHandler("global"), }, @@ -270,7 +271,7 @@ export default definePluginEntry({ choiceHint: "CN endpoint - api.minimaxi.com", groupId: "minimax", groupLabel: "MiniMax", - groupHint: "M2.7 (recommended)", + groupHint: "M3 (recommended)", }, run: createOAuthHandler("cn"), }, diff --git a/minimax/model-definitions.test.ts b/minimax/model-definitions.test.ts index ddc46187d4e..d4601ebbcac 100644 --- a/minimax/model-definitions.test.ts +++ b/minimax/model-definitions.test.ts @@ -9,18 +9,18 @@ import { } from "./model-definitions.js"; describe("minimax model definitions", () => { - it("uses M2.7 as default hosted model", () => { - expect(MINIMAX_HOSTED_MODEL_ID).toBe("MiniMax-M2.7"); + it("uses M3 as default hosted model", () => { + expect(MINIMAX_HOSTED_MODEL_ID).toBe("MiniMax-M3"); }); it("uses the higher upstream MiniMax context and token defaults", () => { expect(DEFAULT_MINIMAX_CONTEXT_WINDOW).toBe(204800); expect(DEFAULT_MINIMAX_MAX_TOKENS).toBe(131072); expect(MINIMAX_API_COST).toEqual({ - input: 0.3, - output: 1.2, - cacheRead: 0.06, - cacheWrite: 0.375, + input: 0.6, + output: 2.4, + cacheRead: 0.12, + cacheWrite: 0, }); }); diff --git a/minimax/model-definitions.ts b/minimax/model-definitions.ts index 718dea466d1..d93f49bdbf5 100644 --- a/minimax/model-definitions.ts +++ b/minimax/model-definitions.ts @@ -7,14 +7,27 @@ export const MINIMAX_CN_API_BASE_URL = "https://api.minimaxi.com/anthropic"; export const MINIMAX_HOSTED_MODEL_ID = MINIMAX_DEFAULT_MODEL_ID; export const MINIMAX_HOSTED_MODEL_REF = `minimax/${MINIMAX_HOSTED_MODEL_ID}`; export const DEFAULT_MINIMAX_CONTEXT_WINDOW = 204800; +export const MINIMAX_M3_CONTEXT_WINDOW = 512_000; export const DEFAULT_MINIMAX_MAX_TOKENS = 131072; export const MINIMAX_API_COST = { + input: 0.6, + output: 2.4, + cacheRead: 0.12, + cacheWrite: 0, +}; +export const MINIMAX_M27_API_COST = { input: 0.3, output: 1.2, cacheRead: 0.06, cacheWrite: 0.375, }; +export const MINIMAX_API_HIGHSPEED_COST = { + input: 0.6, + output: 2.4, + cacheRead: 0.06, + cacheWrite: 0.375, +}; export const MINIMAX_HOSTED_COST = { input: 0, output: 0, @@ -30,6 +43,16 @@ export const MINIMAX_LM_STUDIO_COST = { type MinimaxCatalogId = keyof typeof MINIMAX_TEXT_MODEL_CATALOG; +export function resolveMinimaxApiCost(modelId: string): ModelDefinitionConfig["cost"] { + if (modelId === "MiniMax-M2.7") { + return MINIMAX_M27_API_COST; + } + if (modelId === "MiniMax-M2.7-highspeed") { + return MINIMAX_API_HIGHSPEED_COST; + } + return MINIMAX_API_COST; +} + export function buildMinimaxModelDefinition(params: { id: string; name?: string; @@ -53,7 +76,7 @@ export function buildMinimaxModelDefinition(params: { export function buildMinimaxApiModelDefinition(modelId: string): ModelDefinitionConfig { return buildMinimaxModelDefinition({ id: modelId, - cost: MINIMAX_API_COST, + cost: resolveMinimaxApiCost(modelId), contextWindow: DEFAULT_MINIMAX_CONTEXT_WINDOW, maxTokens: DEFAULT_MINIMAX_MAX_TOKENS, }); diff --git a/minimax/openclaw.plugin.json b/minimax/openclaw.plugin.json index 8f0da029322..e71c319af66 100644 --- a/minimax/openclaw.plugin.json +++ b/minimax/openclaw.plugin.json @@ -17,7 +17,7 @@ "choiceHint": "Global endpoint - api.minimax.io", "groupId": "minimax", "groupLabel": "MiniMax", - "groupHint": "M2.7 (recommended)" + "groupHint": "M3 (recommended)" }, { "provider": "minimax", @@ -28,7 +28,7 @@ "choiceHint": "Global endpoint - api.minimax.io", "groupId": "minimax", "groupLabel": "MiniMax", - "groupHint": "M2.7 (recommended)", + "groupHint": "M3 (recommended)", "optionKey": "minimaxApiKey", "cliFlag": "--minimax-api-key", "cliOption": "--minimax-api-key ", @@ -42,7 +42,7 @@ "choiceHint": "CN endpoint - api.minimaxi.com", "groupId": "minimax", "groupLabel": "MiniMax", - "groupHint": "M2.7 (recommended)" + "groupHint": "M3 (recommended)" }, { "provider": "minimax", @@ -53,7 +53,7 @@ "choiceHint": "CN endpoint - api.minimaxi.com", "groupId": "minimax", "groupLabel": "MiniMax", - "groupHint": "M2.7 (recommended)", + "groupHint": "M3 (recommended)", "optionKey": "minimaxApiKey", "cliFlag": "--minimax-api-key", "cliOption": "--minimax-api-key ", diff --git a/minimax/provider-models.ts b/minimax/provider-models.ts index b4a026deda5..19b78c06958 100644 --- a/minimax/provider-models.ts +++ b/minimax/provider-models.ts @@ -1,11 +1,16 @@ import { matchesExactOrPrefix } from "openclaw/plugin-sdk/provider-model-shared"; -export const MINIMAX_DEFAULT_MODEL_ID = "MiniMax-M2.7"; +export const MINIMAX_DEFAULT_MODEL_ID = "MiniMax-M3"; export const MINIMAX_DEFAULT_MODEL_REF = `minimax/${MINIMAX_DEFAULT_MODEL_ID}`; -export const MINIMAX_TEXT_MODEL_ORDER = ["MiniMax-M2.7", "MiniMax-M2.7-highspeed"] as const; +export const MINIMAX_TEXT_MODEL_ORDER = [ + "MiniMax-M3", + "MiniMax-M2.7", + "MiniMax-M2.7-highspeed", +] as const; export const MINIMAX_TEXT_MODEL_CATALOG = { + "MiniMax-M3": { name: "MiniMax M3", reasoning: true }, "MiniMax-M2.7": { name: "MiniMax M2.7", reasoning: true }, "MiniMax-M2.7-highspeed": { name: "MiniMax M2.7 Highspeed", reasoning: true }, } as const; @@ -14,7 +19,7 @@ export const MINIMAX_TEXT_MODEL_REFS = MINIMAX_TEXT_MODEL_ORDER.map( (modelId) => `minimax/${modelId}`, ); -const MINIMAX_MODERN_MODEL_MATCHERS = ["minimax-m2.7"] as const; +const MINIMAX_MODERN_MODEL_MATCHERS = ["minimax-m3", "minimax-m2.7"] as const; export function isMiniMaxModernModelId(modelId: string): boolean { return matchesExactOrPrefix(modelId, MINIMAX_MODERN_MODEL_MATCHERS); diff --git a/src/agents/minimax.live.test.ts b/src/agents/minimax.live.test.ts index 30c982a791a..98a12450635 100644 --- a/src/agents/minimax.live.test.ts +++ b/src/agents/minimax.live.test.ts @@ -8,7 +8,7 @@ import { const MINIMAX_KEY = process.env.MINIMAX_API_KEY ?? ""; const MINIMAX_BASE_URL = process.env.MINIMAX_BASE_URL?.trim() || "https://api.minimax.io/anthropic"; -const MINIMAX_MODEL = process.env.MINIMAX_MODEL?.trim() || "MiniMax-M2.7"; +const MINIMAX_MODEL = process.env.MINIMAX_MODEL?.trim() || "MiniMax-M3"; const LIVE = isLiveTestEnabled(["MINIMAX_LIVE_TEST"]); const describeLive = LIVE && MINIMAX_KEY ? describe : describe.skip; diff --git a/src/agents/models-config.providers.minimax.test.ts b/src/agents/models-config.providers.minimax.test.ts index e4d31e05af2..2a78ec9405a 100644 --- a/src/agents/models-config.providers.minimax.test.ts +++ b/src/agents/models-config.providers.minimax.test.ts @@ -36,10 +36,12 @@ describe("minimax provider catalog", () => { const providers = await resolveImplicitProvidersForTest({ agentDir }); expect(providers?.minimax?.models?.map((model) => model.id)).toEqual([ + "MiniMax-M3", "MiniMax-M2.7", "MiniMax-M2.7-highspeed", ]); expect(providers?.["minimax-portal"]?.models?.map((model) => model.id)).toEqual([ + "MiniMax-M3", "MiniMax-M2.7", "MiniMax-M2.7-highspeed", ]);