feat: make music_generation model configurable via MINIMAX_MUSIC_MODEL env#59
Open
DenSul wants to merge 1 commit intoMiniMax-AI:mainfrom
Open
feat: make music_generation model configurable via MINIMAX_MUSIC_MODEL env#59DenSul wants to merge 1 commit intoMiniMax-AI:mainfrom
DenSul wants to merge 1 commit intoMiniMax-AI:mainfrom
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
music_generationtool was broken because it hardcodedmodel=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_generationfunction inserver.pyhardcoded"model": DEFAULT_MUSIC_MODELwhereDEFAULT_MUSIC_MODEL = "music-2.0". Since this model no longer exists, users cannot generate music at all.Solution
MINIMAX_MUSIC_MODEL— allows operators to configure which music model to useDEFAULT_MUSIC_MODELchanged frommusic-2.0tomusic-2.6(currently available model)modelparameter added tomusic_generation()for per-request overridemodelparam >MINIMAX_MUSIC_MODELenv >DEFAULT_MUSIC_MODELFiles changed
minimax_mcp/const.py— addedENV_MUSIC_MODEL, updated default tomusic-2.6minimax_mcp/server.py— added env reading +modelparam to tool.env.example— addedMINIMAX_MUSIC_MODEL=music-2.6README.md/README-CN.md— documented new env variabletests/test_music_model.py— added unit tests (5 tests, all passing)Backward compatibility
MINIMAX_MUSIC_MODELis not set, the default is nowmusic-2.6instead ofmusic-2.0modelexplicitly will use the new default