feat: add MiniMax AI as alternative LLM provider#39
Open
octo-patch wants to merge 1 commit intoyeahhe365:mainfrom
Open
feat: add MiniMax AI as alternative LLM provider#39octo-patch wants to merge 1 commit intoyeahhe365:mainfrom
octo-patch wants to merge 1 commit intoyeahhe365:mainfrom
Conversation
Add MiniMax M2.7 and M2.7-highspeed (204K context) as first-class LLM providers alongside Google Gemini. MiniMax uses the OpenAI-compatible API format, so no new npm dependencies are required - just native fetch(). Changes: - New OpenAI-compatible chat API client (stream + non-stream via SSE) - Provider detection and routing in message sender pipeline - MiniMax models in default model picker (pinned) - Separate MiniMax API key field in Settings > API Configuration - Temperature clamping for MiniMax (0, 1.0] range - Thinking tag stripping for M2.7 responses - Bilingual (en/zh) i18n strings - 32 unit + integration tests with vitest - README updated with multi-provider support table
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 AI (M2.7 and M2.7-highspeed, 204K context) as an alternative LLM provider alongside Google Gemini. This is the first step toward making All Model Chat truly multi-provider.
Key changes:
services/api/openaiCompatApi.ts): Lightweight stream + non-stream chat via nativefetch()- no new npm dependenciesuseApiInteraction.ts: Detects MiniMax models and routes through the OpenAI-compat pathMiniMax-M2.7,MiniMax-M2.7-highspeed(0.0, 1.0]- auto-clamped<thinking>blocks extracted and displayed properlyFiles changed (15 files, ~1116 additions):
constants/providerConstants.tsservices/api/openaiCompatApi.tstests/providerConstants.test.tstests/openaiCompatApi.test.tstypes/settings.tsminimaxApiKeyto AppSettingsconstants/appConstants.tsminimaxApiKey: nullutils/modelHelpers.tshooks/.../useApiInteraction.tshooks/.../useStandardChat.tscomponents/.../ApiConfigSection.tsxcomponents/.../SettingsContent.tsxutils/translations/settings/api.tsvite.config.tspackage.jsonREADME.mdHow to use
MiniMax M2.7orMiniMax M2.7 Highspeedfrom the model pickerTest plan
npm test)npm run build)