feat: add MiniMax as a first-class LLM provider#1250
Open
octo-patch wants to merge 5 commits intoMemTensor:dev-20260319-v2.0.10from
Open
feat: add MiniMax as a first-class LLM provider#1250octo-patch wants to merge 5 commits intoMemTensor:dev-20260319-v2.0.10from
octo-patch wants to merge 5 commits intoMemTensor:dev-20260319-v2.0.10from
Conversation
## Description Please include a summary of the change, the problem it solves, the implementation approach, and relevant context. List any dependencies required for this change. Related Issue (Required): Fixes @issue_number ## Type of change Please delete options that are not relevant. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Refactor (does not change functionality, e.g. code style improvements, linting) - [ ] Documentation update ## How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Unit Test - [ ] Test Script Or Test Steps (please provide) - [ ] Pipeline Automated API Test (please provide) ## Checklist - [ ] I have performed a self-review of my own code | 我已自行检查了自己的代码 - [ ] I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释 - [ ] I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常 - [ ] I have created related documentation issue/PR in [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) (if applicable) | 我已在 [MemOS-Docs](https://github.com/MemTensor/MemOS-Docs) 中创建了相关的文档 issue/PR(如果适用) - [ ] I have linked the issue to this PR (if applicable) | 我已将 issue 链接到此 PR(如果适用) - [ ] I have mentioned the person who will review this PR | 我已提及将审查此 PR 的人 ## Reviewer Checklist - [ ] closes #xxxx (Replace xxxx with the GitHub issue number) - [ ] Made sure Checks passed - [ ] Tests have been provided
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)