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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ mmx quota

```bash
mmx text chat --message "Write a poem"
mmx text chat --model MiniMax-M2.7-highspeed --message "Hello" --stream
mmx text chat --model MiniMax-M3 --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 @@ -175,7 +175,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-M2.7-highspeed
mmx config set --key default-text-model --value MiniMax-M3
mmx config export-schema | jq .
```

Expand Down
4 changes: 2 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ mmx quota

```bash
mmx text chat --message "写一首诗"
mmx text chat --model MiniMax-M2.7-highspeed --message "你好" --stream
mmx text chat --model MiniMax-M3 --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 @@ -156,7 +156,7 @@ Global 与中国两个 region,选用能通过的那个。
mmx quota
mmx config show
mmx config set --key region --value cn
mmx config set --key default-text-model --value MiniMax-M2.7-highspeed
mmx config set --key default-text-model --value MiniMax-M3
mmx config export-schema | jq .
```

Expand Down
6 changes: 3 additions & 3 deletions SDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ You can also omit `apiKey` if it's already configured via `mmx config set api-ke

```typescript
const response = await sdk.text.chat({
model: 'MiniMax-M2.7',
model: 'MiniMax-M3',
messages: [{ role: 'user', content: 'Hello!' }],
max_tokens: 4096,
});

// Streaming
const stream = await sdk.text.chat({
model: 'MiniMax-M2.7',
model: 'MiniMax-M3',
messages: [{ role: 'user', content: 'Write a poem' }],
stream: true,
});
Expand Down Expand Up @@ -109,7 +109,7 @@ const englishVoices = await sdk.speech.voices('en');

```typescript
const music = await sdk.music.generate({
model: 'music-2.6',
model: 'music-3.0',
prompt: 'Upbeat pop song',
lyrics: '[verse] La da dee, sunny day',
output_format: 'hex',
Expand Down
4 changes: 2 additions & 2 deletions docs/cli-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mmx
│ ├── refresh Manually refresh OAuth token
│ └── logout Revoke tokens and clear stored credentials
├── text
│ └── chat Send a chat completion (M2.7 / M2.7-highspeed)
│ └── chat Send a chat completion (M3)
├── speech
│ └── synthesize Synchronous TTS, ≤10k chars
├── image
Expand All @@ -29,7 +29,7 @@ mmx
│ │ └── get Query video task status
│ └── download Download a completed video by file ID
├── music
│ └── generate Generate a song (music-2.5)
│ └── generate Generate a song (music-3.0)
├── quota
│ └── show Display Token Plan usage and remaining quotas
└── config
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mmx-cli",
"version": "1.0.17",
"version": "1.0.18",
"description": "CLI for the MiniMax AI Platform",
"type": "module",
"repository": {
Expand Down
12 changes: 6 additions & 6 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-M2.7`.
Chat completion. Default model: `MiniMax-M3`.

```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-M2.7`) |
| `--model <model>` | string | Model ID (default: `MiniMax-M3`) |
| `--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 @@ -206,7 +206,7 @@ echo "Breaking news." | mmx speech synthesize --text-file - --out news.mp3

Generate music. Responds well to rich, structured descriptions.

**Model:** `music-2.6-free` — unlimited for API key users, RPM = 3.
**Model:** `music-3.0` — default model.

```bash
mmx music generate --prompt <text> [--lyrics <text>] [flags]
Expand Down Expand Up @@ -422,10 +422,10 @@ Set per-modality defaults so you don't need `--model` every time:

```bash
# Set defaults
mmx config set --key default-text-model --value MiniMax-M2.7-highspeed
mmx config set --key default-text-model --value MiniMax-M3
mmx config set --key default-speech-model --value speech-2.8-hd
mmx config set --key default-video-model --value MiniMax-Hailuo-2.3
mmx config set --key default-music-model --value music-2.6
mmx config set --key default-music-model --value music-3.0

# Use without --model
mmx text chat --message "Hello"
Expand All @@ -434,7 +434,7 @@ mmx video generate --prompt "Ocean waves"
mmx music generate --prompt "Upbeat pop" --instrumental

# --model still overrides per-call
mmx text chat --model MiniMax-M2.7 --message "Hello"
mmx text chat --model MiniMax-M3 --message "Hello"
```

**Resolution priority**: `--model` flag > config default > hardcoded fallback.
12 changes: 6 additions & 6 deletions src/commands/music/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { MUSIC_GENERATE_MODELS, musicGenerateModel } from './models';

export default defineCommand({
name: 'music generate',
description: 'Generate a song (music-2.6, including free tier)',
description: 'Generate a song (music-3.0)',
apiDocs: '/docs/api-reference/music-generation',
usage: 'mmx music generate --prompt <text> (--lyrics <text> | --instrumental | --lyrics-optimizer) [--out <path>] [flags]',
options: [
Expand All @@ -36,7 +36,7 @@ export default defineCommand({
{ flag: '--structure <text>', description: 'Song structure, e.g. "verse-chorus-verse-bridge-chorus"' },
{ flag: '--references <text>', description: 'Reference tracks or artists, e.g. "similar to Ed Sheeran"' },
{ flag: '--extra <text>', description: 'Additional fine-grained requirements not covered above' },
{ flag: '--model <model>', description: 'Model: music-2.6 (default), music-2.6-free, music-2.5+, or music-2.5.' },
{ flag: '--model <model>', description: 'Model: music-3.0 (default), music-2.6, music-2.6-free, music-2.5+, or music-2.5.' },
{ flag: '--output-format <fmt>', description: 'Return format: hex (default, saved to file) or url (24h expiry, download promptly). When --stream, only hex.' },
{ flag: '--aigc-watermark', description: 'Embed AI-generated content watermark in audio for content provenance' },
{ flag: '--format <fmt>', description: `Audio format: ${formatList(MUSIC_FORMATS)} (default: mp3)` },
Expand All @@ -54,8 +54,8 @@ export default defineCommand({
'mmx music generate --prompt "Cinematic orchestral, building tension" --instrumental --out bgm.mp3',
'# URL output (24h expiry — download promptly):',
'mmx music generate --prompt "Upbeat pop" --lyrics "La la la..." --output-format url',
'# Instrumental with music-2.5+:',
'mmx music generate --prompt "Cinematic orchestral" --model "music-2.5+" --instrumental --out bgm.mp3',
'# Instrumental with music-3.0:',
'mmx music generate --prompt "Cinematic orchestral" --model "music-3.0" --instrumental --out bgm.mp3',
'# Detailed prompt with vocal characteristics:',
'mmx music generate --prompt "Warm morning folk" --vocals "male and female duet, harmonies in chorus" --instruments "acoustic guitar, piano" --bpm 95 --lyrics-file song.txt --out duet.mp3',
],
Expand Down Expand Up @@ -109,7 +109,7 @@ export default defineCommand({
);
}

// Build structured prompt from optional music characteristic flags.
// Build structured prompt from optional music characteristic flags before request assembly.
const structuredParts: string[] = [];
if (flags.vocals) structuredParts.push(`Vocals: ${flags.vocals as string}`);
if (flags.genre) structuredParts.push(`Genre: ${flags.genre as string}`);
Expand Down Expand Up @@ -139,7 +139,7 @@ export default defineCommand({
throw new CLIError(
`Invalid model "${model}". Valid models: ${MUSIC_GENERATE_MODELS.join(', ')}`,
ExitCode.USAGE,
'mmx music generate --model music-2.6',
'mmx music generate --model music-3.0',
);
}
const outFormat = (flags.outputFormat as string) || 'hex';
Expand Down
3 changes: 2 additions & 1 deletion src/commands/music/models.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { Config } from '../../config/schema';

export const MUSIC_GENERATE_MODELS = [
'music-3.0',
'music-2.6',
'music-2.6-free',
'music-2.5+',
Expand All @@ -20,7 +21,7 @@ export function musicGenerateModel(config: Config): string {
) {
return config.defaultMusicModel;
}
return 'music-2.6';
return 'music-3.0';
}

export function musicCoverModel(config: Config): string {
Expand Down
6 changes: 3 additions & 3 deletions src/commands/text/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export default defineCommand({
apiDocs: '/docs/api-reference/text-post',
usage: 'mmx text chat --message <text> [flags]',
options: [
{ flag: '--model <model>', description: 'Model ID (default: MiniMax-M2.7)' },
{ flag: '--model <model>', description: 'Model ID (default: MiniMax-M3)' },
{ flag: '--message <text>', description: 'Message text (repeatable, prefix role: to set role)', required: true, type: 'array' },
{ flag: '--messages-file <path>', description: 'JSON file with messages array (use - for stdin)' },
{ flag: '--system <text>', description: 'System prompt' },
Expand All @@ -171,7 +171,7 @@ export default defineCommand({
],
examples: [
'mmx text chat --message "What is MiniMax?"',
'mmx text chat --model MiniMax-M2.7-highspeed --system "You are a coding assistant." --message "Write fizzbuzz in Python"',
'mmx text chat --model MiniMax-M3 --system "You are a coding assistant." --message "Write fizzbuzz in Python"',
'mmx text chat --message "Hello" --message "assistant:Hi!" --message "How are you?"',
'cat conversation.json | mmx text chat --messages-file - --stream',
'mmx text chat --message "Hello" --output json',
Expand All @@ -197,7 +197,7 @@ export default defineCommand({

const model = (flags.model as string)
|| config.defaultTextModel
|| 'MiniMax-M2.7';
|| 'MiniMax-M3';
const format = detectOutputFormat(config.output);
const shouldStream = flags.stream === true || (
flags.stream === undefined
Expand Down
6 changes: 3 additions & 3 deletions src/commands/text/repl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,15 @@ export default defineCommand({
description: 'Start an interactive multi-turn chat session',
usage: 'mmx text repl [flags]',
options: [
{ flag: '--model <model>', description: 'Model ID (default: MiniMax-M2.7)' },
{ flag: '--model <model>', description: 'Model ID (default: MiniMax-M3)' },
{ flag: '--system <text>', description: 'System prompt' },
{ flag: '--max-tokens <n>', description: 'Maximum tokens per response (default: 4096)', type: 'number' },
{ flag: '--temperature <n>', description: 'Sampling temperature (0.0, 1.0]', type: 'number' },
{ flag: '--top-p <n>', description: 'Nucleus sampling threshold', type: 'number' },
],
examples: [
'mmx text repl',
'mmx text repl --model MiniMax-M2.7-highspeed --system "You are a coding assistant."',
'mmx text repl --model MiniMax-M3 --system "You are a coding assistant."',
'mmx text repl --temperature 0.7 --max-tokens 8192',
],
async run(config: Config, flags: GlobalFlags) {
Expand All @@ -325,7 +325,7 @@ export default defineCommand({
const state: ReplState = {
messages: [],
system: flags.system as string | undefined,
model: (flags.model as string) || config.defaultTextModel || 'MiniMax-M2.7',
model: (flags.model as string) || config.defaultTextModel || 'MiniMax-M3',
maxTokens: (flags.maxTokens as number) ?? 4096,
temperature: flags.temperature !== undefined ? flags.temperature as number : undefined,
topP: flags.topP !== undefined ? flags.topP as number : undefined,
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/text/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class TextSDK extends Client {

return {
...params,
model: params.model ?? 'MiniMax-M2.7',
model: params.model ?? 'MiniMax-M3',
max_tokens: params.max_tokens ?? 4096,
} as ChatRequest;
}
Expand Down
4 changes: 2 additions & 2 deletions test/commands/config/set.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('config set command', () => {
await expect(
setCommand.execute(config, {
key: 'default_text_model',
value: 'MiniMax-M2.7-highspeed',
value: 'MiniMax-M3',
quiet: false,
verbose: false,
noColor: true,
Expand Down Expand Up @@ -118,7 +118,7 @@ describe('config set command', () => {
await expect(
setCommand.execute(config, {
key: 'default-text-model',
value: 'MiniMax-M2.7-highspeed',
value: 'MiniMax-M3',
quiet: false,
verbose: false,
noColor: true,
Expand Down
8 changes: 4 additions & 4 deletions test/commands/config/show.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import * as configLoader from '../../../src/config/loader';

const CONFIG_FILE = {
api_key: 'sk-cp-test-key',
default_text_model: 'MiniMax-M2.7-highspeed',
default_text_model: 'MiniMax-M3',
default_speech_model: 'speech-2.8-hd',
default_video_model: 'MiniMax-Hailuo-2.3-6s-768p',
default_music_model: 'music-2.6',
default_music_model: 'music-3.0',
};

describe('config show command', () => {
Expand Down Expand Up @@ -90,10 +90,10 @@ describe('config show command', () => {
});

const parsed = JSON.parse(output);
expect(parsed.default_text_model).toBe('MiniMax-M2.7-highspeed');
expect(parsed.default_text_model).toBe('MiniMax-M3');
expect(parsed.default_speech_model).toBe('speech-2.8-hd');
expect(parsed.default_video_model).toBe('MiniMax-Hailuo-2.3-6s-768p');
expect(parsed.default_music_model).toBe('music-2.6');
expect(parsed.default_music_model).toBe('music-3.0');
} finally {
console.log = originalLog;
readConfigFile.mockRestore();
Expand Down
12 changes: 6 additions & 6 deletions test/commands/music/generate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe('music generate command', () => {

try {
await generateCommand.execute(
{ ...baseConfig, dryRun: true, output: 'json' as const, defaultMusicModel: 'music-2.6' },
{ ...baseConfig, dryRun: true, output: 'json' as const, defaultMusicModel: 'music-3.0' },
{ ...baseFlags, dryRun: true, prompt: 'Folk', lyrics: 'no lyrics' },
);
} catch {
Expand All @@ -170,7 +170,7 @@ describe('music generate command', () => {

console.log = origLog;
const parsed = JSON.parse(captured);
expect(parsed.request.model).toBe('music-2.6');
expect(parsed.request.model).toBe('music-3.0');
});

it('--model flag overrides defaultMusicModel', async () => {
Expand All @@ -180,7 +180,7 @@ describe('music generate command', () => {

try {
await generateCommand.execute(
{ ...baseConfig, dryRun: true, output: 'json' as const, defaultMusicModel: 'music-2.6' },
{ ...baseConfig, dryRun: true, output: 'json' as const, defaultMusicModel: 'music-3.0' },
{ ...baseFlags, dryRun: true, prompt: 'Folk', lyrics: 'no lyrics', model: 'music-2.5' },
);
} catch {
Expand All @@ -192,7 +192,7 @@ describe('music generate command', () => {
expect(parsed.request.model).toBe('music-2.5');
});

it('accepts the official music-2.6-free model', async () => {
it('accepts the official music-3.0 model', async () => {
let captured = '';
const origLog = console.log;
console.log = (msg: string) => { captured += msg; };
Expand All @@ -205,14 +205,14 @@ describe('music generate command', () => {
dryRun: true,
prompt: 'Folk',
lyrics: 'la la',
model: 'music-2.6-free',
model: 'music-3.0',
},
);
} finally {
console.log = origLog;
}

expect(JSON.parse(captured).request.model).toBe('music-2.6-free');
expect(JSON.parse(captured).request.model).toBe('music-3.0');
});

it('requires prompt for instrumental generation', async () => {
Expand Down
Loading
Loading