feat(chat_v2): add MiniMax AI as LLM provider (default MiniMax-M3)#101
Open
octo-patch wants to merge 2 commits into
Open
feat(chat_v2): add MiniMax AI as LLM provider (default MiniMax-M3)#101octo-patch wants to merge 2 commits into
octo-patch wants to merge 2 commits into
Conversation
Add MiniMax AI (https://www.minimaxi.com) as a third model provider alongside Local (vLLM) and HeyWhale API. This allows users to leverage cloud-hosted MiniMax models (M2.7) without running a local model service. Backend changes: - Add _iter_minimax_stream() using OpenAI-compatible SDK - Extend build_chat_runtime_config() with minimax provider routing - Add MiniMax-specific temperature clamping (0.01-1.0) Frontend changes: - Add MiniMax AI option in Model Provider dropdown - Add MiniMax API Key input field with persistence - Wire model name and API key into chat request Tests: - 27 unit tests covering temperature clamping, config building, stream mocking, and provider routing - 3 integration tests hitting the live MiniMax API
Collaborator
|
Is the API base |
Author
|
Thanks for trying it out @LIUyizheSDU! The correct API base URL for MiniMax is: Note: It's
Let me know if you run into any other issues! |
- Set MINIMAX_DEFAULT_MODEL to MiniMax-M3 (was M2.7) - Update frontend hardcoded model to MiniMax-M3 - Keep MiniMax-M2.7 and MiniMax-M2.7-highspeed as alternatives - Drop M2.5 example in unit tests; use M2.7-highspeed - Update unit test that asserts model param to use M3 - Update README and README_ZH to mention M3 as default
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
MiniMax-M3(512K context window, up to 128K output, image-input capable).MiniMax-M2.7andMiniMax-M2.7-highspeedare still selectable via themodelfieldChanges
Backend (
demo/chat_v2/backend_app/services/chat.py):_iter_minimax_stream(): new streaming function using OpenAI-compatible SDK with MiniMax base URL_normalize_minimax_temperature(): clamps temperature to MiniMax-accepted range [0.01, 1.0]build_chat_runtime_config()withminimaxprovider routing, auto-defaults for API base and model (MiniMax-M3)bot_stream()dispatch to route minimax provider to the new stream iteratorFrontend (
demo/chat_v2/frontend/components/three-panel-interface.tsx):MiniMax-M3) when MiniMax provider is activeDocumentation (
demo/chat_v2/README.md,demo/chat_v2/README_ZH.md):MiniMax-M3; alternativesMiniMax-M2.7/MiniMax-M2.7-highspeednotedTests (
demo/chat_v2/tests/test_minimax_provider.py):MiniMax-M2.5-highspeedexample withMiniMax-M2.7-highspeedMiniMax-M3Why MiniMax-M3 as the new default
MiniMax-M3is the latest MiniMax model: 512K context window, up to 128K output, and image-input support — better suited to long data-analysis transcripts than M2.7 (192K context, 32K output).Test plan
demo/chat_v2/tests/test_minimax_provider.pyupdated to reflect new default modeldemo/chat_v2/tests/test_minimax_integration.pyuseMINIMAX_DEFAULT_MODEL(=MiniMax-M3) and continue to pass