diff --git a/README.md b/README.md index 8ea3f13f..0408d1e4 100644 --- a/README.md +++ b/README.md @@ -70,11 +70,11 @@ 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-Preview`. An explicit `--model` or saved `default-text-model` takes precedence. This preview 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. 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). ```bash mmx text chat --message "Write a poem" -mmx text chat --model MiniMax-M3.1-Flash-Preview --message "Hello" --stream +mmx text chat --model MiniMax-M3.1-Flash --message "Hello" --stream mmx text chat --system "You are a coding assistant" --message "Fizzbuzz in Go" mmx text chat --message "user:Hi" --message "assistant:Hey!" --message "How are you?" cat messages.json | mmx text chat --messages-file - --output json @@ -198,7 +198,7 @@ Credential priority: `--api-key` flag > OAuth (config) > `api_key` (config). mmx quota mmx config show mmx config set --key region --value cn -mmx config set --key default-text-model --value MiniMax-M3.1-Flash-Preview +mmx config set --key default-text-model --value MiniMax-M3.1-Flash mmx config export-schema | jq . ``` @@ -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-Preview` 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 subscription keys and to `MiniMax-M3` for 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 7c2b0848..c3231310 100644 --- a/README_CN.md +++ b/README_CN.md @@ -65,11 +65,11 @@ mmx quota ### `mmx text` -`text chat` 和 `text repl` 默认使用 `MiniMax-M3.1-Flash-Preview`;显式指定的 `--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` 优先。该模型目前仅通过 M Plan 和 MiniMax Code 提供;使用按量付费 Key 时,请显式选择 `MiniMax-M3`。详见[模型调用文档](https://platform.minimax.cn/docs/guides/text-generation#agent)。 ```bash mmx text chat --message "写一首诗" -mmx text chat --model MiniMax-M3.1-Flash-Preview --message "你好" --stream +mmx text chat --model MiniMax-M3.1-Flash --message "你好" --stream mmx text chat --system "你是编程助手" --message "用 Go 写 Fizzbuzz" mmx text chat --message "user:你好" --message "assistant:嗨!" --message "你叫什么名字?" cat messages.json | mmx text chat --messages-file - --output json @@ -172,7 +172,7 @@ Global 与中国两个 region,选用能通过的那个。 mmx quota mmx config show mmx config set --key region --value cn -mmx config set --key default-text-model --value MiniMax-M3.1-Flash-Preview +mmx config set --key default-text-model --value MiniMax-M3.1-Flash mmx config export-schema | jq . ``` @@ -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-Preview`,对按量付费 Key(`sk-api-...`)默认使用 `MiniMax-M3`。非交互模式下可用 `--model` 覆盖该选择。 +`agent setup` 对订阅 Key 默认使用 `MiniMax-M3.1-Flash`,对按量付费 Key(`sk-api-...`)默认使用 `MiniMax-M3`。非交互模式下可用 `--model` 覆盖该选择。 写入前会验证 Key 和所选区域;修改已有文件时会创建备份。可用 `--dry-run` 预览且不会发起联网请求。在交互式向导中,兼容且未在 `PATH` 中检测到的 Agent 会出现在第二个安装多选列表,并通过官方软件包或安装脚本安装。Hermes 仅执行官方核心 CLI 安装阶段,跳过可选系统软件包、Node 工作区、浏览器、计算机控制、初始化和网关阶段。安装完成后,mmx 会保留安装器生成的其他设置并写入 MiniMax 配置。平台或依赖检查不通过的 Agent 会说明原因并保持仅配置。非交互调用仍只写配置,且该命令不会启动 Agent。 diff --git a/SDK.md b/SDK.md index eea1acfd..2dc8f6c6 100644 --- a/SDK.md +++ b/SDK.md @@ -25,18 +25,18 @@ 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-Preview`. This preview 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`. 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). ```typescript const response = await sdk.text.chat({ - model: 'MiniMax-M3.1-Flash-Preview', + model: 'MiniMax-M3.1-Flash', messages: [{ role: 'user', content: 'Hello!' }], max_tokens: 4096, }); // Streaming const stream = await sdk.text.chat({ - model: 'MiniMax-M3.1-Flash-Preview', + model: 'MiniMax-M3.1-Flash', messages: [{ role: 'user', content: 'Write a poem' }], stream: true, }); diff --git a/skill/SKILL.md b/skill/SKILL.md index 13bc1ced..aa638fbc 100644 --- a/skill/SKILL.md +++ b/skill/SKILL.md @@ -46,7 +46,7 @@ Always use these flags in non-interactive (agent/CI) contexts: ### text chat -Chat completion. Default model: `MiniMax-M3.1-Flash-Preview`. An explicit `--model` or saved `default-text-model` takes precedence. This preview currently requires M Plan or MiniMax Code; with a pay-as-you-go key, use `--model MiniMax-M3`. Thinking is enabled by default with `max` effort. See the [model guide](https://platform.minimax.io/docs/guides/text-generation#agent). +Chat completion. Default model: `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, use `--model MiniMax-M3`. Thinking is enabled by default with `max` effort. See the [model guide](https://platform.minimax.io/docs/guides/text-generation#agent). ```bash mmx text chat --message [flags] @@ -57,7 +57,7 @@ mmx text chat --message [flags] | `--message ` | string, **required**, repeatable | Message text. Prefix with `role:` to set role (e.g. `"system:You are helpful"`, `"user:Hello"`) | | `--messages-file ` | string | JSON file with messages array. Use `-` for stdin | | `--system ` | string | System prompt | -| `--model ` | string | Model ID (default: `MiniMax-M3.1-Flash-Preview`) | +| `--model ` | string | Model ID (default: `MiniMax-M3.1-Flash`) | | `--max-tokens ` | number | Max tokens (default: 4096) | | `--temperature ` | number | Sampling temperature (0.0, 1.0] | | `--top-p ` | number | Nucleus sampling threshold | @@ -381,7 +381,7 @@ Set per-modality defaults so you don't need `--model` every time: ```bash # Set defaults -mmx config set --key default-text-model --value MiniMax-M3.1-Flash-Preview +mmx config set --key default-text-model --value MiniMax-M3.1-Flash mmx config set --key default-speech-model --value speech-2.8-hd mmx config set --key default-video-model --value MiniMax-Hailuo-2.3 @@ -391,7 +391,7 @@ mmx speech synthesize --text "Hello" --out hello.mp3 mmx video generate --prompt "Ocean waves" # --model still overrides per-call -mmx text chat --model MiniMax-M3.1-Flash-Preview --message "Hello" +mmx text chat --model MiniMax-M3.1-Flash --message "Hello" ``` **Resolution priority**: `--model` flag > config default > hardcoded fallback. diff --git a/src/agent/configurator.ts b/src/agent/configurator.ts index 521220b8..90455dc2 100644 --- a/src/agent/configurator.ts +++ b/src/agent/configurator.ts @@ -48,7 +48,7 @@ function minimaxModel(modelId: MiniMaxModelId) { } function claudeModelId(modelId: MiniMaxModelId): string { - return modelId === 'MiniMax-M3.1-Flash-Preview' || modelId === 'MiniMax-M3' + return modelId === 'MiniMax-M3.1-Flash' || modelId === 'MiniMax-M3' ? `${modelId}[1m]` : modelId; } @@ -465,7 +465,7 @@ function updateHermesYaml( document.setIn(['model', 'base_url'], baseUrl); document.setIn( ['model', 'context_length'], - model === 'MiniMax-M3.1-Flash-Preview' || model === 'MiniMax-M3' + model === 'MiniMax-M3.1-Flash' || model === 'MiniMax-M3' ? 1_000_000 : selectedModel.contextWindow, ); @@ -532,7 +532,7 @@ function prepareClaude(options: AgentSetupOptions, path: string): PreparedAgentF model: claudeModelId(candidate.id), label: candidate.id, description: candidate.id === options.model - ? `1M supported · ${candidate.id === 'MiniMax-M3.1-Flash-Preview' + ? `1M supported · ${candidate.id === 'MiniMax-M3.1-Flash' && (options.m31ContextWindow ?? 524288) !== 1_000_000 ? '512K' : '1M'} compact` : '1M supported', })); @@ -563,7 +563,7 @@ function prepareClaude(options: AgentSetupOptions, path: string): PreparedAgentF API_TIMEOUT_MS: '3000000', CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: '1', CLAUDE_CODE_AUTO_COMPACT_WINDOW: String( - options.model === 'MiniMax-M3.1-Flash-Preview' + options.model === 'MiniMax-M3.1-Flash' ? options.m31ContextWindow ?? 524288 : minimaxModel(options.model).contextWindow, ), @@ -591,13 +591,13 @@ function codexModelCatalog(options: AgentSetupOptions): string { return `${JSON.stringify({ _managed_by: CODEX_MODEL_CATALOG_OWNER, models: MINIMAX_MODELS.map((model, priority) => { - const contextWindow = model.id === 'MiniMax-M3.1-Flash-Preview' + const contextWindow = model.id === 'MiniMax-M3.1-Flash' ? options.m31ContextWindow ?? 524288 : model.contextWindow; return { slug: model.id, display_name: model.id, - description: model.id === 'MiniMax-M3.1-Flash-Preview' - ? 'MiniMax M3.1 Flash Preview' + description: model.id === 'MiniMax-M3.1-Flash' + ? 'MiniMax M3.1 Flash' : 'MiniMax', default_reasoning_level: model.codex.defaultReasoningLevel, supported_reasoning_levels: model.codex.supportedReasoningLevels, @@ -770,7 +770,7 @@ function prepareOpenCode(options: AgentSetupOptions, path: string): PreparedAgen `OpenCode model definition for ${model.id} modalities must be an object.`, ); } - if (model.id === 'MiniMax-M3.1-Flash-Preview') { + if (model.id === 'MiniMax-M3.1-Flash') { const variants = (configuredModel as Record | undefined)?.variants; if (variants !== undefined) { assertObject(variants, `OpenCode model definition for ${model.id} variants must be an object.`); @@ -798,7 +798,7 @@ function prepareOpenCode(options: AgentSetupOptions, path: string): PreparedAgen }, { path: ['provider', 'minimax', 'models', model.id, 'limit', 'context'], - value: model.id === 'MiniMax-M3.1-Flash-Preview' + value: model.id === 'MiniMax-M3.1-Flash' ? options.m31ContextWindow ?? 524288 : model.contextWindow, }, { @@ -807,7 +807,7 @@ function prepareOpenCode(options: AgentSetupOptions, path: string): PreparedAgen }, ]; }); - const m31Path = ['provider', 'minimax', 'models', 'MiniMax-M3.1-Flash-Preview']; + const m31Path = ['provider', 'minimax', 'models', 'MiniMax-M3.1-Flash']; const m31Updates = [ { path: [...m31Path, 'interleaved'], value: { field: 'reasoning_content' } }, { path: [...m31Path, 'variants', 'none', 'disabled'], value: true }, @@ -1013,7 +1013,7 @@ function prepareOhMyPi(options: AgentSetupOptions, paths: string[]): PreparedAge input: [...model.input], contextWindow: model.contextWindow, maxTokens: model.maxTokens, - ...(model.id === 'MiniMax-M3.1-Flash-Preview' ? { + ...(model.id === 'MiniMax-M3.1-Flash' ? { thinking: { mode: 'anthropic-adaptive', efforts: ['low', 'medium', 'high', 'xhigh', 'max'], @@ -1032,7 +1032,7 @@ function prepareOhMyPi(options: AgentSetupOptions, paths: string[]): PreparedAge } } else { if (root.modelRoles !== undefined) assertObject(root.modelRoles, `${label} modelRoles must be an object.`); - const effort = options.model === 'MiniMax-M3.1-Flash-Preview' ? ':max' : ''; + const effort = options.model === 'MiniMax-M3.1-Flash' ? ':max' : ''; document.setIn(['modelRoles', 'default'], `${providerId}/${options.model}${effort}`); } return { agent: 'oh-my-pi', path, ...existing, after: document.toString() }; diff --git a/src/commands/agent/setup.ts b/src/commands/agent/setup.ts index 89a1569f..4db8c45f 100644 --- a/src/commands/agent/setup.ts +++ b/src/commands/agent/setup.ts @@ -321,7 +321,7 @@ async function interactiveOptions( let m31ContextWindow: 524288 | 1_000_000 = 524288; if (agents.some(agent => agent === 'claude-code' || agent === 'codex' || agent === 'opencode')) { const selectedWindow = await promptSelect({ - message: 'Choose the MiniMax-M3.1-Flash-Preview context window', + message: 'Choose the MiniMax-M3.1-Flash context window', choices: [ { value: '512k', label: '512K (Recommended)' }, { value: '1m', label: '1M' }, @@ -378,7 +378,7 @@ async function interactiveOptions( if (model === 'MiniMax-M3') { await promptNote({ title: 'Model for pay-as-you-go key', - message: 'MiniMax-M3.1-Flash-Preview currently requires Token Plan or MiniMax Code. ' + 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') ? ' The earlier window choice applies to the M3.1 model entry, not the active M3 model.' @@ -506,7 +506,7 @@ export default defineCommand({ }, { flag: '--m31-context-window ', - description: 'MiniMax-M3.1-Flash-Preview window for Claude Code, Codex, and OpenCode: 512k (recommended) or 1m', + description: 'MiniMax-M3.1-Flash window for Claude Code, Codex, and OpenCode: 512k (recommended) or 1m', }, ], examples: [ diff --git a/src/config/models.ts b/src/config/models.ts index ee78cac5..8855ba02 100644 --- a/src/config/models.ts +++ b/src/config/models.ts @@ -1 +1 @@ -export const DEFAULT_TEXT_MODEL = 'MiniMax-M3.1-Flash-Preview'; +export const DEFAULT_TEXT_MODEL = 'MiniMax-M3.1-Flash'; diff --git a/test/agent/configurator.test.ts b/test/agent/configurator.test.ts index 5a7dbca8..74ded527 100644 --- a/test/agent/configurator.test.ts +++ b/test/agent/configurator.test.ts @@ -78,26 +78,26 @@ describe('agent configurator', () => { it('keeps the 1M Claude selector with a 512K auto-compact window for M3.1', () => { applyAgentConfigurations(prepareAgentConfigurations(setupOptions( ['claude-code'], - { model: 'MiniMax-M3.1-Flash-Preview' }, + { model: 'MiniMax-M3.1-Flash' }, ))); const claude = JSON.parse(readFileSync(join(home, '.claude', 'settings.json'), 'utf8')); expect(claude.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW).toBe('524288'); expect(claude.modelPicker.options.find((item: { label: string }) => - item.label === 'MiniMax-M3.1-Flash-Preview').description).toBe('1M supported · 512K compact'); + item.label === 'MiniMax-M3.1-Flash').description).toBe('1M supported · 512K compact'); for (const key of [ 'ANTHROPIC_MODEL', 'ANTHROPIC_DEFAULT_SONNET_MODEL', 'ANTHROPIC_DEFAULT_OPUS_MODEL', 'ANTHROPIC_DEFAULT_HAIKU_MODEL', ]) { - expect(claude.env[key]).toBe('MiniMax-M3.1-Flash-Preview[1m]'); + expect(claude.env[key]).toBe('MiniMax-M3.1-Flash[1m]'); } }); it('applies the M3.1 window choice to Claude Code, Codex, and OpenCode', () => { const options = setupOptions(['claude-code', 'codex', 'opencode'], { - model: 'MiniMax-M3.1-Flash-Preview', + model: 'MiniMax-M3.1-Flash', m31ContextWindow: 1_000_000, }); applyAgentConfigurations(prepareAgentConfigurations(options)); @@ -108,7 +108,7 @@ describe('agent configurator', () => { .replace(/^\s*\/\/.*$/gm, '')); expect(claude.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW).toBe('1000000'); expect(claude.modelPicker.options.find((item: { label: string }) => - item.label === 'MiniMax-M3.1-Flash-Preview').description).toBe('1M supported · 1M compact'); + item.label === 'MiniMax-M3.1-Flash').description).toBe('1M supported · 1M compact'); expect(catalog.models[0]).toMatchObject({ context_window: 1_000_000, max_context_window: 1_000_000, @@ -118,7 +118,7 @@ describe('agent configurator', () => { context_window: 1_000_000, effective_context_window_percent: 85, }); - expect(openCode.provider.minimax.models['MiniMax-M3.1-Flash-Preview'].limit.context) + expect(openCode.provider.minimax.models['MiniMax-M3.1-Flash'].limit.context) .toBe(1_000_000); applyAgentConfigurations(prepareAgentConfigurations({ ...options, m31ContextWindow: 524288 })); @@ -128,14 +128,14 @@ describe('agent configurator', () => { .replace(/^\s*\/\/.*$/gm, '')); expect(claude.env.CLAUDE_CODE_AUTO_COMPACT_WINDOW).toBe('524288'); expect(claude.modelPicker.options.find((item: { label: string }) => - item.label === 'MiniMax-M3.1-Flash-Preview').description).toBe('1M supported · 512K compact'); + item.label === 'MiniMax-M3.1-Flash').description).toBe('1M supported · 512K compact'); expect(catalog.models[0]).toMatchObject({ context_window: 524288, max_context_window: 524288, effective_context_window_percent: 95, }); expect(catalog.models[1].context_window).toBe(1_000_000); - expect(openCode.provider.minimax.models['MiniMax-M3.1-Flash-Preview'].limit.context) + expect(openCode.provider.minimax.models['MiniMax-M3.1-Flash'].limit.context) .toBe(524288); }); @@ -159,8 +159,8 @@ describe('agent configurator', () => { options: [ { model: 'keep-model', label: 'Keep' }, { - model: 'MiniMax-M3.1-Flash-Preview[1m]', - label: 'MiniMax-M3.1-Flash-Preview', + model: 'MiniMax-M3.1-Flash[1m]', + label: 'MiniMax-M3.1-Flash', description: '1M supported', }, { model: 'MiniMax-M3[1m]', label: 'MiniMax-M3', description: '1M supported · 1M compact' }, @@ -184,8 +184,8 @@ describe('agent configurator', () => { expect(codexCatalog._managed_by).toBe('mmx agent setup'); expect(codexCatalog.models).toHaveLength(2); expect(codexCatalog.models[0]).toMatchObject({ - slug: 'MiniMax-M3.1-Flash-Preview', - description: 'MiniMax M3.1 Flash Preview', + slug: 'MiniMax-M3.1-Flash', + description: 'MiniMax M3.1 Flash', priority: 0, default_reasoning_level: 'max', supported_reasoning_levels: [ @@ -236,7 +236,7 @@ describe('agent configurator', () => { writeFileSync(join(m31Home, '.codex', 'config.toml'), 'model_reasoning_effort = "medium"\n'); const m31Options = setupOptions(['codex'], { homeDir: m31Home, - model: 'MiniMax-M3.1-Flash-Preview', + model: 'MiniMax-M3.1-Flash', }); applyAgentConfigurations(prepareAgentConfigurations(m31Options)); const m31Config = parseToml(readFileSync(join(m31Home, '.codex', 'config.toml'), 'utf8')); @@ -264,7 +264,7 @@ describe('agent configurator', () => { .toEqual({ input: ['text', 'image'], output: ['text'] }); expect(openCode.provider.minimax.models['MiniMax-M3'].limit) .toEqual({ context: 1_000_000, output: 128000 }); - const m31OpenCode = openCode.provider.minimax.models['MiniMax-M3.1-Flash-Preview']; + const m31OpenCode = openCode.provider.minimax.models['MiniMax-M3.1-Flash']; expect(m31OpenCode.reasoning).toBe(true); expect(m31OpenCode.temperature).toBe(true); expect(m31OpenCode.interleaved).toEqual({ field: 'reasoning_content' }); @@ -275,7 +275,7 @@ describe('agent configurator', () => { expect(m31OpenCode.variants[effort].reasoningEffort).toBe(effort); } expect(Object.keys(openCode.provider.minimax.models).sort()) - .toEqual(['MiniMax-M3', 'MiniMax-M3.1-Flash-Preview', 'keep-model']); + .toEqual(['MiniMax-M3', 'MiniMax-M3.1-Flash', 'keep-model']); const hermes = parseYaml(readFileSync(join(home, '.hermes', 'config.yaml'), 'utf8')); expect(hermes.model.provider).toBe('minimax-cn'); @@ -284,12 +284,12 @@ describe('agent configurator', () => { expect(hermes.agent.reasoning_overrides['MiniMax-M3']).toBe('none'); expect(Object.keys(hermes.model_overrides['minimax-cn'])) .toEqual([ - 'MiniMax-M3.1-Flash-Preview', + 'MiniMax-M3.1-Flash', 'MiniMax-M3', ]); expect(hermes.model_overrides['minimax-cn']['MiniMax-M3'].context_window) .toBe(1_000_000); - expect(hermes.model_overrides['minimax-cn']['MiniMax-M3.1-Flash-Preview'].context_window) + expect(hermes.model_overrides['minimax-cn']['MiniMax-M3.1-Flash'].context_window) .toBe(1_000_000); expect(hermes.model_overrides['minimax-cn']['MiniMax-M3'].supports_vision) .toBe(true); @@ -318,7 +318,7 @@ describe('agent configurator', () => { .toEqual([ 'keep-model', 'MiniMax-M3', - 'MiniMax-M3.1-Flash-Preview', + 'MiniMax-M3.1-Flash', ]); expect(piSettings).toMatchObject({ defaultProvider: 'minimax-cn', defaultModel: 'MiniMax-M3' }); @@ -344,7 +344,7 @@ describe('agent configurator', () => { it('uses 1M for Hermes M3.1 and M3', () => { applyAgentConfigurations(prepareAgentConfigurations(setupOptions( ['hermes'], - { model: 'MiniMax-M3.1-Flash-Preview' }, + { model: 'MiniMax-M3.1-Flash' }, ))); let configured = parseYaml(readFileSync(join(home, '.hermes', 'config.yaml'), 'utf8')); expect(configured.model.context_length).toBe(1_000_000); @@ -404,7 +404,7 @@ describe('agent configurator', () => { applyAgentConfigurations(prepareAgentConfigurations(setupOptions( ['codex'], - { model: 'MiniMax-M3.1-Flash-Preview', m31ContextWindow: 524288 }, + { model: 'MiniMax-M3.1-Flash', m31ContextWindow: 524288 }, ))); const configText = readFileSync(join(home, '.codex', 'config.toml'), 'utf8'); @@ -507,7 +507,7 @@ describe('agent configurator', () => { const configured = JSON.parse(readFileSync(modelsPath, 'utf8')); expect(configured.providers.minimax.models.map((model: { id: string }) => model.id)) .toEqual([ - 'MiniMax-M3.1-Flash-Preview', + 'MiniMax-M3.1-Flash', 'MiniMax-M3', ]); expect(configured.providers.minimax.models[0]).toMatchObject({ diff --git a/test/agent/oh-my-pi.test.ts b/test/agent/oh-my-pi.test.ts index 71907792..a9df711f 100644 --- a/test/agent/oh-my-pi.test.ts +++ b/test/agent/oh-my-pi.test.ts @@ -15,7 +15,7 @@ describe('Oh my Pi configuration', () => { homeDir = mkdtempSync(join(tmpdir(), 'mmx-omp-')); options = { agents: ['oh-my-pi'], homeDir, env: {}, region: 'global', - apiKey: 'sk-cp-test-only', model: 'MiniMax-M3.1-Flash-Preview', + apiKey: 'sk-cp-test-only', model: 'MiniMax-M3.1-Flash', }; }); @@ -27,7 +27,7 @@ describe('Oh my Pi configuration', () => { writeFileSync(join(dir, 'models.yaml'), '# keep models comment\nproviders:\n custom:\n apiKey: KEEP\n' + ' minimax:\n headers: {x-keep: yes}\n models:\n' + ' - id: keep-model\n name: Keep\n' - + ' - id: MiniMax-M3.1-Flash-Preview\n cost: {input: 1, output: 2, cacheRead: 0, cacheWrite: 0}\n'); + + ' - id: MiniMax-M3.1-Flash\n cost: {input: 1, output: 2, cacheRead: 0, cacheWrite: 0}\n'); writeFileSync(join(dir, 'config.yaml'), '# keep config comment\ntheme: {dark: titanium}\n' + 'modelRoles:\n smol: custom/keep-model\n default: old/model\n'); for (const region of ['global', 'cn'] as const) { diff --git a/test/commands/agent/setup.test.ts b/test/commands/agent/setup.test.ts index 80bd35c3..dc4c3b24 100644 --- a/test/commands/agent/setup.test.ts +++ b/test/commands/agent/setup.test.ts @@ -198,7 +198,7 @@ describe('agent setup command', () => { testFlags({ agent: ['codex'], region: 'cn', output: 'json' }), )); - expect(JSON.parse(output).verification.model).toBe('MiniMax-M3.1-Flash-Preview'); + expect(JSON.parse(output).verification.model).toBe('MiniMax-M3.1-Flash'); expect(output).not.toContain('sk-cp-existing-key'); }); @@ -352,7 +352,7 @@ describe('agent setup command', () => { expect(JSON.parse(output).verification.model).toBe('MiniMax-M3'); }); - it('uses MiniMax-M3.1-Flash-Preview when no model is specified', async () => { + it('uses MiniMax-M3.1-Flash when no model is specified', async () => { const output = await captureConsoleLog(() => setupCommand.execute( testConfig(), testFlags({ @@ -361,7 +361,7 @@ describe('agent setup command', () => { region: 'cn', }), )); - expect(JSON.parse(output).verification.model).toBe('MiniMax-M3.1-Flash-Preview'); + expect(JSON.parse(output).verification.model).toBe('MiniMax-M3.1-Flash'); }); it('uses MiniMax-M3 by default 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-Preview', + model: 'MiniMax-M3.1-Flash', }), )); - expect(JSON.parse(output).verification.model).toBe('MiniMax-M3.1-Flash-Preview'); + expect(JSON.parse(output).verification.model).toBe('MiniMax-M3.1-Flash'); }); it('rejects a legacy model outside this setup contract', async () => { @@ -422,7 +422,7 @@ describe('agent setup command', () => { const result = JSON.parse(output); expect(result.agents.filter((agent: string) => agent === 'oh-my-pi')).toHaveLength(1); expect(result.files.filter((file: { agent: string }) => file.agent === 'oh-my-pi')).toHaveLength(2); - expect(result.verification.model).toBe('MiniMax-M3.1-Flash-Preview'); + expect(result.verification.model).toBe('MiniMax-M3.1-Flash'); expect(output).not.toContain('sk-cp-test-secret'); } }); diff --git a/test/commands/text/chat.test.ts b/test/commands/text/chat.test.ts index e65405cf..622affaf 100644 --- a/test/commands/text/chat.test.ts +++ b/test/commands/text/chat.test.ts @@ -96,7 +96,7 @@ describe('text chat command', () => { }); const parsed = JSON.parse(output); - expect(parsed.request.model).toBe('MiniMax-M3.1-Flash-Preview'); + expect(parsed.request.model).toBe('MiniMax-M3.1-Flash'); expect(parsed.request.messages).toHaveLength(1); } finally { console.log = originalLog; diff --git a/test/sdk/text.test.ts b/test/sdk/text.test.ts index 1c3de987..d6b9a037 100644 --- a/test/sdk/text.test.ts +++ b/test/sdk/text.test.ts @@ -21,7 +21,7 @@ describe('MiniMaxSDK.text', () => { type: 'message', role: 'assistant', content: [{ type: 'text', text: 'Hello!' }], - model: 'MiniMax-M3.1-Flash-Preview', + model: 'MiniMax-M3.1-Flash', stop_reason: 'end_turn', usage: { input_tokens: 10, output_tokens: 5 }, }); @@ -40,7 +40,7 @@ describe('MiniMaxSDK.text', () => { expect(result.id).toBe('msg-123'); expect(requestBody).toMatchObject({ - model: 'MiniMax-M3.1-Flash-Preview', + model: 'MiniMax-M3.1-Flash', max_tokens: 4096, }); });