feat: add MiniMax as first-class LLM provider#297
Open
octo-patch wants to merge 1 commit intoPySpur-Dev:mainfrom
Open
feat: add MiniMax as first-class LLM provider#297octo-patch wants to merge 1 commit intoPySpur-Dev:mainfrom
octo-patch wants to merge 1 commit intoPySpur-Dev:mainfrom
Conversation
Add MiniMax AI (M2.7, M2.5, M2.5-highspeed) as a built-in LLM provider, routed via OpenAI-compatible API through litellm. Changes: - Register MiniMax in LLMProvider enum and LLMModels with correct constraints (temperature 0-1, JSON output support, 8192 max tokens) - Add MiniMax routing in completion_with_backoff to use OpenAI-compatible handler with configurable MINIMAX_API_BASE - Exclude minimax/ prefix from Azure OpenAI fallback routing - Add MiniMax provider config in key_management for Settings UI - Add MiniMax icon mapping in frontend SettingsModal - Add MINIMAX_API_KEY to .env.example - Fix NoneType error in generate_text when litellm doesn't recognize provider by falling back to OpenAI params for OpenAI-compatible providers - Add 38 unit tests + 3 integration tests
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
Changes
_model_info.pyMINIMAXtoLLMProviderenum, register 3 models inLLMModelswith correct constraints_utils.pyminimax/routing incompletion_with_backoff(OpenAI-compat with configurable base URL), exclude from Azure fallback, fix NoneType error for custom providers ingenerate_textkey_management.pyMINIMAX_API_KEY) for Settings UISettingsModal.tsx.env.exampleMINIMAX_API_KEYplaceholderREADME.mdConfiguration
Set
MINIMAX_API_KEYin the Settings UI or.envfile. Optionally setMINIMAX_API_BASEfor custom endpoints (defaults tohttps://api.minimax.io/v1).Test plan