Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 .
```

Expand All @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 .
```

Expand All @@ -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。

Expand Down
6 changes: 3 additions & 3 deletions SDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down
8 changes: 4 additions & 4 deletions skill/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <text> [flags]
Expand All @@ -57,7 +57,7 @@ mmx text chat --message <text> [flags]
| `--message <text>` | string, **required**, repeatable | Message text. Prefix with `role:` to set role (e.g. `"system:You are helpful"`, `"user:Hello"`) |
| `--messages-file <path>` | string | JSON file with messages array. Use `-` for stdin |
| `--system <text>` | string | System prompt |
| `--model <model>` | string | Model ID (default: `MiniMax-M3.1-Flash-Preview`) |
| `--model <model>` | string | Model ID (default: `MiniMax-M3.1-Flash`) |
| `--max-tokens <n>` | number | Max tokens (default: 4096) |
| `--temperature <n>` | number | Sampling temperature (0.0, 1.0] |
| `--top-p <n>` | number | Nucleus sampling threshold |
Expand Down Expand Up @@ -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

Expand All @@ -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.
24 changes: 12 additions & 12 deletions src/agent/configurator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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,
);
Expand Down Expand Up @@ -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',
}));
Expand Down Expand Up @@ -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,
),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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<string, unknown> | undefined)?.variants;
if (variants !== undefined) {
assertObject(variants, `OpenCode model definition for ${model.id} variants must be an object.`);
Expand Down Expand Up @@ -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,
},
{
Expand All @@ -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 },
Expand Down Expand Up @@ -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'],
Expand All @@ -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() };
Expand Down
6 changes: 3 additions & 3 deletions src/commands/agent/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down Expand Up @@ -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.'
Expand Down Expand Up @@ -506,7 +506,7 @@ export default defineCommand({
},
{
flag: '--m31-context-window <size>',
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: [
Expand Down
2 changes: 1 addition & 1 deletion src/config/models.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const DEFAULT_TEXT_MODEL = 'MiniMax-M3.1-Flash-Preview';
export const DEFAULT_TEXT_MODEL = 'MiniMax-M3.1-Flash';
Loading
Loading