feat: add MiniMax as alternative LLM provider#13
Open
octo-patch wants to merge 1 commit into
Open
Conversation
Add MiniMax (MiniMax-M2.7, MiniMax-M2.7-highspeed) as a first-class LLM provider for the reasoning agent, alongside the existing GPT-4 and Azure OpenAI backends. Changes: - New llm/minimax.py: MiniMaxLLM class extending BaseLLM, using MiniMax's OpenAI-compatible API at api.minimax.io, with temperature clamping (0,1] and think-tag stripping for M2.7 models - config.yml: added MINIMAX section with API_KEY, MODEL, MAX_TOKENS, TEMPERATURE - llm/__init__.py: export MiniMaxLLM - pipeline/the4kagent_pipeline.py: --llm_provider flag (gpt4/azure/minimax) selects the LLM backend at runtime - infer_4kagent.py: --llm_provider CLI argument - README.md: documented MiniMax provider usage with example - tests/: 38 unit tests + 6 integration tests (44 total, all passing)
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 (MiniMax-M2.7, MiniMax-M2.7-highspeed with 204K context) as a first-class LLM provider for 4KAgent reasoning agent, alongside the existing GPT-4 and Azure OpenAI backends.
Changes
llm/minimax.py:MiniMaxLLMclass extendingBaseLLM, using MiniMax OpenAI-compatible API atapi.minimax.io/v1, with:config.yml: AddedMINIMAXsection withAPI_KEY,MODEL,MAX_TOKENS,TEMPERATUREllm/__init__.py: ExportMiniMaxLLMpipeline/the4kagent_pipeline.py: Addedllm_providerparameter - supportsgpt4(default),azure, andminimaxinfer_4kagent.py: Added--llm_providerCLI argument with choices[gpt4, azure, minimax]README.md: Documented MiniMax provider setup and usage with example commandtests/: 38 unit tests + 6 integration tests (44 total, all passing)Usage
# Set MINIMAX API key in config.yml, then: python infer_4kagent.py \ --input_dir ./dataset/LQ \ --output_dir ./outputs/results \ --profile_name ExpSR_s4_F \ --llm_provider minimaxWhy MiniMax?
Test plan
--llm_provider gpt4)