Add MiniMax as alternative LLM provider#428
Open
octo-patch wants to merge 1 commit intoNVIDIA:mainfrom
Open
Conversation
Add MiniMax Cloud API (https://api.minimax.io/v1) as an alternative LLM provider alongside NVIDIA AI endpoints. MiniMax offers an OpenAI-compatible API with models including MiniMax-M2.7 (1M context) and MiniMax-M2.5-highspeed (204K context, speed-optimized). Changes: - Add 'minimax' model_engine branch in get_llm() factory (utils.py) - Use ChatOpenAI from langchain-openai with MiniMax base_url - Temperature clamping to [0, 1] range for MiniMax API compatibility - Auto-detect MINIMAX_API_KEY environment variable - Add langchain-openai dependency to requirements.txt - Update LLMConfig help text to mention minimax - Add MiniMax usage documentation in docs/change-model.md - Add 15 unit tests and 3 integration tests Co-Authored-By: Octopus <liyuan851277048@icloud.com>
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
get_llm()factoryMiniMax-M2.7(1M context) andMiniMax-M2.5-highspeed(204K context, speed-optimized)ChatOpenAIfromlangchain-openaiwith MiniMax base URL — no new proprietary SDK required[0, 1]range for MiniMax API compatibilityChanges
RAG/src/chain_server/utils.pyminimaxbranch inget_llm()factory usingChatOpenAIRAG/src/chain_server/configuration.pymodel_enginehelp text to listminimaxRAG/src/chain_server/requirements.txtlangchain-openai>=0.0.6dependencydocs/change-model.mdRAG/src/chain_server/tests/Usage
Test plan
APP_LLM_MODELENGINE=minimax