Skip to content

feat: add per-modality default model configuration#89

Merged
RyanLee-Dev merged 1 commit intoMiniMax-AI:mainfrom
raylanlin:feat/default-models
Apr 11, 2026
Merged

feat: add per-modality default model configuration#89
RyanLee-Dev merged 1 commit intoMiniMax-AI:mainfrom
raylanlin:feat/default-models

Conversation

@raylanlin
Copy link
Copy Markdown
Contributor

@raylanlin raylanlin commented Apr 11, 2026

Summary

Allow users to set default models in config.json for each modality, avoiding the need to pass --model on every command.

New Config Keys

Key Hyphen alias Default
default_text_model default-text-model MiniMax-M2.7
default_speech_model default-speech-model speech-2.8-hd
default_video_model default-video-model MiniMax-Hailuo-2.3
default_music_model default-music-model key-type-based

Resolution Priority

  1. Explicit --model flag (highest)
  2. Config file default
  3. Hardcoded fallback (lowest)

Special Cases

  • Video: Auto-switch flags (--lastFrame, --subjectImage) still take priority over config defaults.
  • Music Cover: defaultMusicModel only applies if the value is a valid cover model name (music-cover / music-cover-free), otherwise the key-type-based default is preserved.

Usage

# Set defaults
mmx config set --key default-text-model --value MiniMax-M2.7-highspeed
mmx config set --key default-music-model --value music-2.6

# Use without --model
mmx text chat --message "Hello"
mmx music generate --prompt "Upbeat piano" --instrumental

# --model still overrides
mmx text chat --model MiniMax-M2.7 --message "Hello"

Tests

  • 97 tests pass (24 new tests added)
  • Coverage: config set/show, text chat, speech synthesize, video generate, music generate, model resolution logic, music cover isolation

@raylanlin raylanlin force-pushed the feat/default-models branch from 326b01c to 46427ef Compare April 11, 2026 18:29
Allow users to set default models in config.json for each modality,
avoiding the need to pass --model on every command.

New config keys:
  - default_text_model  (default-text-model)
  - default_speech_model (default-speech-model)
  - default_video_model  (default-video-model)
  - default_music_model  (default-music-model)

Resolution priority:
  1. Explicit --model flag (highest)
  2. Config file default
  3. Hardcoded fallback (lowest)

Special cases:
  - Video: auto-switch flags (--lastFrame, --subjectImage) take
    priority over config defaults
  - Music Cover: defaultMusicModel only applies if the value is a
    valid cover model name, otherwise key-type default is preserved

Hardcoded defaults:
  - text: MiniMax-M2.7
  - speech: speech-2.8-hd
  - video: MiniMax-Hailuo-2.3
  - music: music-2.6-free (pay-as-you-go) / music-2.6 (token plan)

Tests: 97 pass (24 new tests across 6 test files)
@raylanlin raylanlin force-pushed the feat/default-models branch from 46427ef to 9ee6fe9 Compare April 11, 2026 19:04
@RyanLee-Dev RyanLee-Dev merged commit 9e9dc54 into MiniMax-AI:main Apr 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants