feat: add MiniMax as LLM provider via OpenAI-compatible API#2284
Open
octo-patch wants to merge 1 commit intoSciPhi-AI:mainfrom
Open
feat: add MiniMax as LLM provider via OpenAI-compatible API#2284octo-patch wants to merge 1 commit intoSciPhi-AI:mainfrom
octo-patch wants to merge 1 commit intoSciPhi-AI:mainfrom
Conversation
Add MiniMax AI (https://api.minimax.io/v1) as a supported LLM provider in the OpenAI completion provider, following the same pattern as DeepSeek. Users can use models like minimax/MiniMax-M2.7 and minimax/MiniMax-M2.5-highspeed. Changes: - Add MiniMax client init in OpenAICompletionProvider (sync + async) - Add minimax/ prefix routing in client selection methods - Add temperature clamping to [0, 1] range for MiniMax API - Add minimax/ to R2R router's OpenAI-like prefixes - Add minimax.toml config file for quick setup - Update README with MiniMax getting started instructions - Add 19 unit tests and 3 integration tests Configuration: export MINIMAX_API_KEY=your-key # Use model: minimax/MiniMax-M2.7 or minimax/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 AI as a supported LLM provider in R2R's OpenAI completion provider, following the same integration pattern as DeepSeek.
MiniMax offers an OpenAI-compatible API at
https://api.minimax.io/v1with models like MiniMax-M2.7 (latest, 204K context) and MiniMax-M2.5-highspeed (optimized for speed).Changes
py/core/providers/llm/openai.py): Add MiniMax client initialization (sync + async) withMINIMAX_API_KEYenv var,minimax/prefix routing in both sync and async client selection, and temperature clamping to MiniMax's[0, 1]rangepy/core/providers/llm/r2r_llm.py): Addminimax/to OpenAI-like prefixes for automatic routingpy/core/configs/minimax.toml): Ready-to-use config for MiniMax-powered R2R deploymentpy/README.md): Add MiniMax getting started instructionsUsage
Or with the R2R provider (auto-routing):
Models supported
minimax/MiniMax-M2.7minimax/MiniMax-M2.5minimax/MiniMax-M2.5-highspeedTest plan