feat: add MiniMax as a first-class LLM provider#1250
Closed
octo-patch wants to merge 3 commits intoMemTensor:dev-20260323-v2.0.11from
Closed
feat: add MiniMax as a first-class LLM provider#1250octo-patch wants to merge 3 commits intoMemTensor:dev-20260323-v2.0.11from
octo-patch wants to merge 3 commits intoMemTensor:dev-20260323-v2.0.11from
Conversation
Add MiniMax LLM support via the OpenAI-compatible API, following the same pattern as the existing Qwen and DeepSeek providers. Changes: - Add MinimaxLLMConfig with api_key, api_base, extra_body fields - Add MinimaxLLM class inheriting from OpenAILLM - Register minimax backend in LLMFactory and LLMConfigFactory - Add minimax_config() to APIConfig with env var support (MINIMAX_API_KEY, MINIMAX_API_BASE) - Add minimax to backend_model dicts in product/user config - Add MiniMax example scenario in examples/basic_modules/llm.py - Add unit tests for config and LLM (generate, stream, think prefix) - Update .env.example and README with MiniMax provider info MiniMax API: https://api.minimax.io/v1 (OpenAI-compatible) Models: MiniMax-M2.5, MiniMax-M2.5-highspeed (204K context)
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 provider in MemOS, following the same clean pattern as the existing Qwen and DeepSeek integrations.
What is MiniMax?
MiniMax is an AI company that provides OpenAI-compatible LLM APIs. Their latest models include:
API Base URL:
https://api.minimax.io/v1(fully OpenAI-compatible)Changes
src/memos/llms/minimax.py—MinimaxLLMclass inheriting fromOpenAILLMMinimaxLLMConfiginsrc/memos/configs/llm.pywithapi_key,api_base,extra_bodyfieldsminimaxbackend in bothLLMFactoryandLLMConfigFactoryminimax_config()toAPIConfigwith environment variable support (MINIMAX_API_KEY,MINIMAX_API_BASE)minimaxtobackend_modeldicts inget_product_default_config()andcreate_user_config()examples/basic_modules/llm.pytests/llms/test_minimax.pyandtests/configs/test_llm.py.env.exampleandREADME.mdto list MiniMax as a supported providerUsage
Or via environment variables:
Test Plan
pytest tests/llms/test_minimax.py(4 tests)pytest tests/configs/test_llm.py(6 tests)pytest tests/llms/test_deepseek.py tests/llms/test_qwen.py(4 tests)