feat: add MiniMax as generation backend#365
Open
octo-patch wants to merge 1 commit intoOpenBMB:mainfrom
Open
Conversation
Add MiniMax as a first-class LLM provider in the generation server, alongside vllm, openai, and hf backends. MiniMax provides OpenAI-compatible cloud APIs with M2.7 and M2.5 model series. Features: - Dedicated minimax backend with auto-detection of MINIMAX_API_KEY - Temperature clamping to MiniMax's (0, 1] range - Automatic <think>...</think> tag stripping (configurable) - Default model: MiniMax-M2.7 (1M context window) - Concurrent request support with retry logic - Example YAML pipeline and parameter configuration - 38 unit tests + 3 integration tests - Documentation in both English and Chinese READMEs Supported models: MiniMax-M2.7, MiniMax-M2.7-highspeed, MiniMax-M2.5, MiniMax-M2.5-highspeed
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
Add MiniMax as a first-class LLM generation backend alongside the existing
vllm,openai, andhfbackends.MiniMax provides OpenAI-compatible cloud APIs with models featuring up to 1M context windows, making them well-suited for RAG workloads that require processing large retrieved contexts.
Changes
servers/generation/src/generation.py— Addedminimaxbackend with:MINIMAX_API_KEYenvironment variable<think>...</think>tag stripping (configurable viastrip_think_tags)MiniMax-M2.7(1M context)_clamp_temperature()and_strip_think_tags()servers/generation/parameter.yaml— Added MiniMax config section with all available optionsexamples/minimax_rag.yaml— Example RAG pipeline using MiniMax backendexamples/parameter/minimax_generation_parameter.yaml— Full parameter referenceREADME.md/docs/README_zh.md— Added "Supported Cloud LLM Backends" table documenting all four backends with MiniMax usage instructionstests/test_minimax_generation.py— 38 unit tests covering temperature clamping, think-tag stripping, initialization, and generationtests/test_minimax_integration.py— 3 integration tests (auto-skipped whenMINIMAX_API_KEYis not set)Supported Models
MiniMax-M2.7MiniMax-M2.7-highspeedMiniMax-M2.5MiniMax-M2.5-highspeedUsage
Or set
backend: minimaxin your generation parameter file.Test Plan
9 files changed, 857 additions(+), 3 deletions(-)