Skip to content

feat: make music_generation model configurable via MINIMAX_MUSIC_MODEL env#59

Open
DenSul wants to merge 1 commit intoMiniMax-AI:mainfrom
DenSul:feat/music-model-from-env
Open

feat: make music_generation model configurable via MINIMAX_MUSIC_MODEL env#59
DenSul wants to merge 1 commit intoMiniMax-AI:mainfrom
DenSul:feat/music-model-from-env

Conversation

@DenSul
Copy link
Copy Markdown

@DenSul DenSul commented Apr 16, 2026

Summary

The music_generation tool was broken because it hardcoded model=music-2.0, which has been deprecated and is no longer available on the MiniMax API. This PR makes the model configurable via environment variable.

Problem

The music_generation function in server.py hardcoded "model": DEFAULT_MUSIC_MODEL where DEFAULT_MUSIC_MODEL = "music-2.0". Since this model no longer exists, users cannot generate music at all.

Solution

  1. New env variable: MINIMAX_MUSIC_MODEL — allows operators to configure which music model to use
  2. Updated default: DEFAULT_MUSIC_MODEL changed from music-2.0 to music-2.6 (currently available model)
  3. Optional tool parameter: model parameter added to music_generation() for per-request override
  4. Priority: explicit model param > MINIMAX_MUSIC_MODEL env > DEFAULT_MUSIC_MODEL

Files changed

  • minimax_mcp/const.py — added ENV_MUSIC_MODEL, updated default to music-2.6
  • minimax_mcp/server.py — added env reading + model param to tool
  • .env.example — added MINIMAX_MUSIC_MODEL=music-2.6
  • README.md / README-CN.md — documented new env variable
  • tests/test_music_model.py — added unit tests (5 tests, all passing)

Backward compatibility

  • If MINIMAX_MUSIC_MODEL is not set, the default is now music-2.6 instead of music-2.0
  • Existing code that does not pass model explicitly will use the new default

…L env

The music_generation tool previously hardcoded model=music-2.0 which is
deprecated. This change:

- Adds MINIMAX_MUSIC_MODEL env variable for configuring the music model
- Changes default from music-2.0 to music-2.6 (the currently available model)
- Adds optional model parameter to music_generation() tool for per-request override
- Reads model from env at startup with fallback to DEFAULT_MUSIC_MODEL

Fixes music_generation being completely broken due to deprecated model.
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.

1 participant