feat: add MiniMax M2.7/M2.5 provider support via minimax/ prefix#18
Open
octo-patch wants to merge 1 commit into
Open
feat: add MiniMax M2.7/M2.5 provider support via minimax/ prefix#18octo-patch wants to merge 1 commit into
octo-patch wants to merge 1 commit into
Conversation
- Add _is_minimax_model() and _resolve_model_config() helpers in llm.py - Auto-route minimax/<model> to openai/<model> via MiniMax's OpenAI-compat API - Auto-set base_url to https://api.minimax.io/v1 when using minimax/ prefix - Clamp temperature to (0.0, 1.0] as required by MiniMax API - Add minimax_api_base, minimax_default_model constants in consts.py - Add 22 unit + integration tests in tests/test_llm_minimax.py - Document MiniMax usage with MINIMAX_API_KEY in README.md
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
This PR adds first-class MiniMax LLM provider support to llmgraph via a
minimax/model prefix, routing through LiteLLM's OpenAI-compatible API path.What changed
llmgraph/library/llm.py— added_is_minimax_model()and_resolve_model_config()helpers; updatedmake_call()to auto-routeminimax/<model>toopenai/<model>with MiniMax's API base URL and clamped temperaturellmgraph/library/consts.py— addedminimax_api_base,minimax_default_model, andminimax_model_prefixconstantstests/test_llm_minimax.py— 22 tests (9 unit_is_minimax_model, 11 unit_resolve_model_config, 3 integration tests formake_call)README.md— added MiniMax usage exampleUsage
Supported models:
MiniMax-M2.7,MiniMax-M2.7-highspeed,MiniMax-M2.5,MiniMax-M2.5-highspeed(all 204K context).Provider-specific handling
https://api.minimax.io/v1when usingminimax/prefixMINIMAX_API_KEYenv var; LiteLLM picks it up automatically(0.0, 1.0]— MiniMax rejectstemperature=0minimax/MiniMax-M2.7→openai/MiniMax-M2.7via LiteLLM OpenAI-compat pathTest results