diff --git a/README.md b/README.md index 0f9ca5c6..da568664 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ derives the npm package version from that tag. See [the release guide](docs/rele ### `mmx text` -`text chat` and `text repl` default to `MiniMax-M3.1-Flash`. An explicit `--model` or saved `default-text-model` takes precedence. This model currently requires M Plan or MiniMax Code; with a pay-as-you-go key, select `MiniMax-M3` explicitly. See the [model guide](https://platform.minimax.io/docs/guides/text-generation#agent). +`text chat` and `text repl` default to `MiniMax-M3.1-Flash`. An explicit `--model` or saved `default-text-model` takes precedence. It is available with Token Plan, MiniMax Code, and pay-as-you-go keys. See the [model guide](https://platform.minimax.io/docs/guides/text-generation#agent). ```bash mmx text chat --message "Write a poem" @@ -214,7 +214,7 @@ mmx agent setup --agent oh-my-pi --api-key "$MINIMAX_API_KEY" --region global # --agent omp is an alias for --agent oh-my-pi ``` -`agent setup` defaults to `MiniMax-M3.1-Flash` for subscription keys and to `MiniMax-M3` for pay-as-you-go keys (`sk-api-...`). In non-interactive mode, `--model` overrides this selection. +`agent setup` defaults to `MiniMax-M3.1-Flash` for both Token Plan and pay-as-you-go keys (`sk-api-...`). In non-interactive mode, `--model` overrides this selection. The command verifies the key and selected region before writing. Existing files are backed up when changed; use `--dry-run` to preview without a live request. In the interactive wizard, compatible agents that are missing from `PATH` can be installed from a second multi-select list using their official packages or installer scripts. The Hermes install uses its official core CLI stages and skips optional system packages, Node workspace, browser, computer-use, setup, and gateway stages. After installation, mmx applies the MiniMax configuration while preserving installer settings. Agents that fail a platform or prerequisite check are explained and left configuration-only. Non-interactive invocations remain configuration-only, and the command never launches an agent. diff --git a/README_CN.md b/README_CN.md index 913abc8f..73da5a98 100644 --- a/README_CN.md +++ b/README_CN.md @@ -65,7 +65,7 @@ mmx quota ### `mmx text` -`text chat` 和 `text repl` 默认使用 `MiniMax-M3.1-Flash`;显式指定的 `--model` 或已保存的 `default-text-model` 优先。该模型目前仅通过 M Plan 和 MiniMax Code 提供;使用按量付费 Key 时,请显式选择 `MiniMax-M3`。详见[模型调用文档](https://platform.minimax.cn/docs/guides/text-generation#agent)。 +`text chat` 和 `text repl` 默认使用 `MiniMax-M3.1-Flash`;显式指定的 `--model` 或已保存的 `default-text-model` 优先。Token Plan、MiniMax Code 和按量付费 Key 均可使用该模型。详见[模型调用文档](https://platform.minimax.cn/docs/guides/text-generation#agent)。 ```bash mmx text chat --message "写一首诗" @@ -188,7 +188,7 @@ mmx agent setup --agent oh-my-pi --api-key "$MINIMAX_API_KEY" --region cn # --agent omp 是 --agent oh-my-pi 的别名 ``` -`agent setup` 对订阅 Key 默认使用 `MiniMax-M3.1-Flash`,对按量付费 Key(`sk-api-...`)默认使用 `MiniMax-M3`。非交互模式下可用 `--model` 覆盖该选择。 +`agent setup` 对订阅 Key 和按量付费 Key(`sk-api-...`)都默认使用 `MiniMax-M3.1-Flash`。非交互模式下可用 `--model` 覆盖该选择。 写入前会验证 Key 和所选区域;修改已有文件时会创建备份。可用 `--dry-run` 预览且不会发起联网请求。在交互式向导中,兼容且未在 `PATH` 中检测到的 Agent 会出现在第二个安装多选列表,并通过官方软件包或安装脚本安装。Hermes 仅执行官方核心 CLI 安装阶段,跳过可选系统软件包、Node 工作区、浏览器、计算机控制、初始化和网关阶段。安装完成后,mmx 会保留安装器生成的其他设置并写入 MiniMax 配置。平台或依赖检查不通过的 Agent 会说明原因并保持仅配置。非交互调用仍只写配置,且该命令不会启动 Agent。 diff --git a/SDK.md b/SDK.md index 2dc8f6c6..c463d289 100644 --- a/SDK.md +++ b/SDK.md @@ -25,7 +25,7 @@ You can also omit `apiKey` if it's already configured via `mmx config set api-ke ### Text -When `model` is omitted, the SDK uses `MiniMax-M3.1-Flash`. This model currently requires M Plan or MiniMax Code; with a pay-as-you-go key, pass `model: 'MiniMax-M3'` explicitly. Thinking is enabled by default with `max` effort; no extra request fields are required. See the [model guide](https://platform.minimax.io/docs/guides/text-generation#agent). +When `model` is omitted, the SDK uses `MiniMax-M3.1-Flash`. It is available with Token Plan, MiniMax Code, and pay-as-you-go keys. Thinking is enabled by default with `max` effort; no extra request fields are required. See the [model guide](https://platform.minimax.io/docs/guides/text-generation#agent). ```typescript const response = await sdk.text.chat({ diff --git a/src/commands/agent/setup.ts b/src/commands/agent/setup.ts index 21d5f271..691c2c4b 100644 --- a/src/commands/agent/setup.ts +++ b/src/commands/agent/setup.ts @@ -137,10 +137,6 @@ function detectApiKeyKind(apiKey: string): ApiKeyKind | undefined { return undefined; } -function defaultModelForApiKey(apiKey: string): typeof DEFAULT_MINIMAX_MODEL | 'MiniMax-M3' { - return detectApiKeyKind(apiKey) === 'paygo' ? 'MiniMax-M3' : DEFAULT_MINIMAX_MODEL; -} - function readExistingCodexApiKey(agents: AgentId[]): string | undefined { if (!agents.includes('codex')) return undefined; const home = homedir(); @@ -379,17 +375,7 @@ async function interactiveOptions( if (!apiKey) { throw new CLIError('A MiniMax API key is required.', ExitCode.USAGE); } - const model = defaultModelForApiKey(apiKey); - if (model === 'MiniMax-M3') { - await promptNote({ - title: 'Model for pay-as-you-go key', - message: 'MiniMax-M3.1-Flash currently requires Token Plan or MiniMax Code. ' - + 'This setup will use MiniMax-M3.' - + (agents.some(agent => agent === 'claude-code' || agent === 'codex' || agent === 'opencode' || agent === 'zed') - ? ' The earlier window choice applies to the M3.1 model entry, not the active M3 model.' - : ''), - }); - } + const model = DEFAULT_MINIMAX_MODEL; let message = `Configure ${agents.map((agent) => AGENT_LABELS[agent]).join(', ')}? ` + 'mmx will write configuration files.'; @@ -469,7 +455,7 @@ function nonInteractiveOptions(flags: GlobalFlags): SelectedAgentSetup { ); } - const model = ((flags.model as string | undefined) ?? defaultModelForApiKey(apiKey)).trim(); + const model = ((flags.model as string | undefined) ?? DEFAULT_MINIMAX_MODEL).trim(); if (!model) throw new CLIError('--model must not be empty.', ExitCode.USAGE); const supportedModel = MINIMAX_MODELS.find(candidate => candidate.id === model)?.id; if (!supportedModel) { diff --git a/test/commands/agent/setup.test.ts b/test/commands/agent/setup.test.ts index 8b4e853a..315ce64e 100644 --- a/test/commands/agent/setup.test.ts +++ b/test/commands/agent/setup.test.ts @@ -364,7 +364,7 @@ describe('agent setup command', () => { expect(JSON.parse(output).verification.model).toBe('MiniMax-M3.1-Flash'); }); - it('uses MiniMax-M3 by default for pay-as-you-go keys', async () => { + it('uses MiniMax-M3.1-Flash by default for pay-as-you-go keys', async () => { const output = await captureConsoleLog(() => setupCommand.execute( testConfig(), testFlags({ @@ -373,7 +373,7 @@ describe('agent setup command', () => { region: 'cn', }), )); - expect(JSON.parse(output).verification.model).toBe('MiniMax-M3'); + expect(JSON.parse(output).verification.model).toBe('MiniMax-M3.1-Flash'); }); it('keeps an explicit model choice for pay-as-you-go keys', async () => { @@ -383,10 +383,10 @@ describe('agent setup command', () => { agent: ['codex'], apiKey: 'sk-api-test-secret', region: 'cn', - model: 'MiniMax-M3.1-Flash', + model: 'MiniMax-M3', }), )); - expect(JSON.parse(output).verification.model).toBe('MiniMax-M3.1-Flash'); + expect(JSON.parse(output).verification.model).toBe('MiniMax-M3'); }); it('rejects a legacy model outside this setup contract', async () => {