feat: add MiniMax chat model support#1320
Closed
octo-patch wants to merge 1 commit intoagentscope-ai:mainfrom
Closed
feat: add MiniMax chat model support#1320octo-patch wants to merge 1 commit intoagentscope-ai:mainfrom
octo-patch wants to merge 1 commit intoagentscope-ai:mainfrom
Conversation
Add MiniMaxChatModel as a dedicated model class for MiniMax's OpenAI-compatible API, supporting MiniMax-M2.5 and MiniMax-M2.5-highspeed models. - New _minimax_model.py extending OpenAIChatModel with MiniMax defaults - Auto-configures base_url to https://api.minimax.io/v1 - Reads API key from MINIMAX_API_KEY environment variable - Registered in model __init__.py for direct import
|
|
Member
|
Thanks for this PR! There's already a similar PR (#1302) that implements this feature. Since theirs was opened first, we'll proceed with reviewing that one. If you have ideas for improvements or a different implementation approach, feel free to share your thoughts on PR #1302 or the related discussion. We value collaboration and would love to hear your perspective! Thanks again for contributing! To keep the discussion and review in one place, I’m going to close this one. |
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
Adds
MiniMaxChatModelas a dedicated model class for MiniMax's LLM API, enabling first-class support for MiniMax models in AgentScope.Changes
src/agentscope/model/_minimax_model.py: New model class extendingOpenAIChatModelwith MiniMax-specific defaults (base URL, API key env var, model names)src/agentscope/model/__init__.py: AddedMiniMaxChatModelto module exportsUsage
Key Details
OpenAIChatModelsince MiniMax API is OpenAI-compatiblehttps://api.minimax.io/v1MiniMax-M2.5(204K context window)MiniMax-M2.5-highspeedfor speed-optimized inferenceMINIMAX_API_KEYenvironment variableTest Plan
MiniMaxChatModelfromagentscope.modelMINIMAX_API_KEYenv var is read when api_key not provided