Add MiniMax as a first-class LLM provider#690
Open
octo-patch wants to merge 2 commits intogoogle:mainfrom
Open
Add MiniMax as a first-class LLM provider#690octo-patch wants to merge 2 commits intogoogle:mainfrom
octo-patch wants to merge 2 commits intogoogle:mainfrom
Conversation
Add support for MiniMax models (M2.7 and M2.7-highspeed) via their OpenAI-compatible Chat Completion API. MiniMax is a leading AI company offering high-performance language models with up to 1M context window. Changes: - Add langfun/core/llms/minimax.py with MiniMax provider class extending OpenAIChatCompletionAPI, including model info, temperature clamping (MiniMax requires temperature > 0), and API key management - Add langfun/core/llms/minimax_test.py with 10 unit tests - Update langfun/core/llms/__init__.py to export MiniMax classes - Update README.md to mention MiniMax in supported providers list
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
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 Langfun, following the existing patterns used by DeepSeek and Groq providers.
Changes
langfun/core/llms/minimax.py— New provider module:MiniMaxModelInfoextendinglf.ModelInfowith provider metadata and linksMiniMaxbase class extendingOpenAIChatCompletionAPIwith MiniMax-specific configurationMiniMaxM27andMiniMaxM27Highspeedconvenience classes for MiniMax-M2.7 and MiniMax-M2.7-highspeed modelsapi_keyparameter orMINIMAX_API_KEYenvironment variablelf.LanguageModel.register()forLanguageModel.get()supportlangfun/core/llms/minimax_test.py— 10 unit tests covering:LanguageModel.get()registrationlangfun/core/llms/__init__.py— Added MiniMax exportsREADME.md— Added MiniMax to the list of supported LLMsSupported Models
MiniMax-M2.7MiniMax-M2.7-highspeedUsage
Test Results
All 10 unit tests pass. Existing provider tests (DeepSeek, Groq) continue to pass without regressions.
4 files changed, 288 additions, 1 deletion