feat(ai): add MiniMax as third LLM provider#445
Closed
octo-patch wants to merge 1 commit intokite-org:mainfrom
Closed
feat(ai): add MiniMax as third LLM provider#445octo-patch wants to merge 1 commit intokite-org:mainfrom
octo-patch wants to merge 1 commit intokite-org:mainfrom
Conversation
Add MiniMax (https://www.minimaxi.com) as a first-class AI provider alongside OpenAI and Anthropic. MiniMax models are fully compatible with the OpenAI chat completions API, so the existing OpenAI SDK is reused with MiniMax's base URL (https://api.minimax.io/v1). Backend changes: - Add GeneralAIProviderMiniMax constant and MiniMax-M2.7 default model - Add NewMiniMaxClient() factory returning an OpenAI-compatible client - Route MiniMax provider through the existing OpenAI conversation flow - Update provider normalization, validation, and label functions Frontend changes: - Add MiniMax option to provider dropdown in general settings - Update TypeScript types to include 'minimax' provider - Add MiniMax-specific model placeholder and base URL hint Tests: - 15 unit tests for config (provider normalization, labels, client factories) - 12 unit tests for model (provider support, default models, constants)
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 AI provider alongside OpenAI and Anthropic. MiniMax models (M2.7, M2.5, M2.5-highspeed) are fully compatible with the OpenAI chat completions API, so the existing
openai-goSDK is reused with MiniMax's base URL (https://api.minimax.io/v1).Changes
Backend (Go)
GeneralAIProviderMiniMax = "minimax"constant andMiniMax-M2.7default modelNewMiniMaxClient()factory that returns an OpenAI-compatible client configured with MiniMax's API endpointNormalizeGeneralAIProvider(),IsGeneralAIProviderSupported(),DefaultGeneralAIModelByProvider(), andproviderLabel()to handle MiniMaxFrontend (React/TypeScript)
GeneralSetting,GeneralSettingUpdateRequest) to includeminimaxMiniMax-M2.7) and base URL hint (https://api.minimax.io/v1)Tests
pkg/ai/config_test.gocovering provider normalization, labels, client factory creation and rejectionpkg/model/general_setting_test.gocovering provider support validation, default models, constantsDocumentation
How to Use
MiniMax-M2.7and the base URL defaults tohttps://api.minimax.io/v1Test Plan
go test ./pkg/ai/... ./pkg/model/...)Files Changed (9 files, 345 additions)
pkg/model/general_setting.gopkg/model/general_setting_test.gopkg/ai/config.goNewMiniMaxClient()factory, provider labelpkg/ai/config_test.gopkg/ai/agent.goNewAgent()ui/src/lib/api.tsui/src/components/settings/general-management.tsxREADME.mdREADME_zh.md