-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat: add MiniMax as LLM provider with M2.7 and M2.7-highspeed models #1937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
e68b7fb
c4057c0
07df671
4971b1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -141,6 +141,14 @@ function createProviderInstance(config: ProviderConfig) { | |
| headers, | ||
| }); | ||
|
|
||
| case SupportedProvider.MiniMax: | ||
| return createOpenAICompatible({ | ||
| name: 'minimax', | ||
| apiKey, | ||
| baseURL: baseURL ?? 'https://api.minimax.io/v1', | ||
| headers, | ||
| }); | ||
|
Comment on lines
+144
to
+150
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This logic for creating the MiniMax provider is duplicated in |
||
|
|
||
| case SupportedProvider.Ollama: { | ||
| // Account settings store the base Ollama URL (e.g., 'http://localhost:11434') | ||
| // but the OpenAI-compatible SDK needs the /v1 path appended. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,6 +66,11 @@ export const ALL_AVAILABLE_MODELS: ModelOption[] = [ | |
| { value: 'grok-4-0709', label: 'Grok 4', provider: 'xai', description: 'Flagship', capabilities: { thinking: true, tools: true, vision: true, contextWindow: 256000 } }, | ||
| { value: 'grok-3', label: 'Grok 3', provider: 'xai', description: 'Text', capabilities: { thinking: false, tools: true, vision: false, contextWindow: 131072 } }, | ||
| { value: 'grok-3-mini', label: 'Grok 3 Mini', provider: 'xai', description: 'Fast reasoning', capabilities: { thinking: true, tools: true, vision: false, contextWindow: 131072 } }, | ||
| // MiniMax | ||
| { value: 'minimax-m2.7', label: 'MiniMax M2.7', provider: 'minimax', description: 'Latest flagship model with enhanced reasoning and coding', capabilities: { thinking: false, tools: true, vision: false, contextWindow: 204800 } }, | ||
| { value: 'minimax-m2.7-highspeed', label: 'MiniMax M2.7 High Speed', provider: 'minimax', description: 'High-speed version of M2.7 for low-latency scenarios', capabilities: { thinking: false, tools: true, vision: false, contextWindow: 204800 } }, | ||
| { value: 'minimax-m2.5', label: 'MiniMax M2.5', provider: 'minimax', description: 'Previous generation', capabilities: { thinking: false, tools: true, vision: false, contextWindow: 204800 } }, | ||
| { value: 'minimax-m2.5-highspeed', label: 'MiniMax M2.5 High Speed', provider: 'minimax', description: 'Fast and agile', capabilities: { thinking: false, tools: true, vision: false, contextWindow: 204800 } }, | ||
| // Z.AI (Zhipu) | ||
| { value: 'glm-5', label: 'GLM-5', provider: 'zai', description: 'Flagship', capabilities: { thinking: false, tools: true, vision: false, contextWindow: 128000 } }, | ||
| { value: 'glm-4.7', label: 'GLM-4.7', provider: 'zai', description: 'Previous flagship', capabilities: { thinking: false, tools: true, vision: false, contextWindow: 128000 } }, | ||
|
|
@@ -316,6 +321,11 @@ export const PROVIDER_PRESET_DEFINITIONS: Partial<Record<BuiltinProvider, Record | |
| balanced: { primaryModel: 'glm-4.7', primaryThinking: 'low', phaseModels: { spec: 'glm-4.7', planning: 'glm-4.7', coding: 'glm-4.7', qa: 'glm-4.7' }, phaseThinking: { spec: 'low', planning: 'low', coding: 'low', qa: 'low' } }, | ||
| quick: { primaryModel: 'glm-4.5-flash', primaryThinking: 'low', phaseModels: { spec: 'glm-4.5-flash', planning: 'glm-4.5-flash', coding: 'glm-4.5-flash', qa: 'glm-4.5-flash' }, phaseThinking: { spec: 'low', planning: 'low', coding: 'low', qa: 'low' } }, | ||
| }, | ||
| minimax: { | ||
| auto: { primaryModel: 'minimax-m2.7', primaryThinking: 'low', phaseModels: { spec: 'minimax-m2.7', planning: 'minimax-m2.7', coding: 'minimax-m2.7', qa: 'minimax-m2.7' }, phaseThinking: { spec: 'low', planning: 'low', coding: 'low', qa: 'low' } }, | ||
| balanced: { primaryModel: 'minimax-m2.7', primaryThinking: 'low', phaseModels: { spec: 'minimax-m2.7', planning: 'minimax-m2.7', coding: 'minimax-m2.7', qa: 'minimax-m2.7' }, phaseThinking: { spec: 'low', planning: 'low', coding: 'low', qa: 'low' } }, | ||
| quick: { primaryModel: 'minimax-m2.7-highspeed', primaryThinking: 'low', phaseModels: { spec: 'minimax-m2.7-highspeed', planning: 'minimax-m2.7-highspeed', coding: 'minimax-m2.7-highspeed', qa: 'minimax-m2.7-highspeed' }, phaseThinking: { spec: 'low', planning: 'low', coding: 'low', qa: 'low' } }, | ||
| }, | ||
|
Comment on lines
+324
to
+328
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The MiniMax provider is missing the Suggested FixAdd a Prompt for AI Agent |
||
| ollama: { | ||
| auto: { primaryModel: '', primaryThinking: 'low', phaseModels: { spec: '', planning: '', coding: '', qa: '' }, phaseThinking: { spec: 'low', planning: 'low', coding: 'low', qa: 'low' } }, | ||
| complex: { primaryModel: '', primaryThinking: 'low', phaseModels: { spec: '', planning: '', coding: '', qa: '' }, phaseThinking: { spec: 'low', planning: 'low', coding: 'low', qa: 'low' } }, | ||
|
|
@@ -414,6 +424,27 @@ export const DEFAULT_MODEL_EQUIVALENCES: Record<string, Partial<Record<BuiltinPr | |
| mistral: { modelId: 'mistral-large-latest', reasoning: { type: 'none' } }, | ||
| groq: { modelId: 'meta-llama/llama-4-maverick', reasoning: { type: 'none' } }, | ||
| zai: { modelId: 'glm-5', reasoning: { type: 'none' } }, | ||
| minimax: { modelId: 'minimax-m2.7', reasoning: { type: 'none' } }, | ||
| }, | ||
| 'minimax-m2.7': { | ||
| minimax: { modelId: 'minimax-m2.7', reasoning: { type: 'none' } }, | ||
| anthropic: { modelId: 'claude-opus-4-6', reasoning: { type: 'adaptive_effort', level: 'high' } }, | ||
| openai: { modelId: 'gpt-5.3-codex', reasoning: { type: 'reasoning_effort', level: 'high' } }, | ||
| }, | ||
| 'minimax-m2.7-highspeed': { | ||
| minimax: { modelId: 'minimax-m2.7-highspeed', reasoning: { type: 'none' } }, | ||
| anthropic: { modelId: 'claude-haiku-4-5-20251001', reasoning: { type: 'none' } }, | ||
| openai: { modelId: 'gpt-5.1-codex-mini', reasoning: { type: 'reasoning_effort', level: 'low' } }, | ||
| }, | ||
| 'minimax-m2.5': { | ||
| minimax: { modelId: 'minimax-m2.5', reasoning: { type: 'none' } }, | ||
| anthropic: { modelId: 'claude-sonnet-4-6', reasoning: { type: 'thinking_tokens', level: 'medium' } }, | ||
| openai: { modelId: 'gpt-5.2', reasoning: { type: 'reasoning_effort', level: 'medium' } }, | ||
| }, | ||
| 'minimax-m2.5-highspeed': { | ||
| minimax: { modelId: 'minimax-m2.5-highspeed', reasoning: { type: 'none' } }, | ||
| anthropic: { modelId: 'claude-haiku-4-5-20251001', reasoning: { type: 'none' } }, | ||
| openai: { modelId: 'gpt-5.1-codex-mini', reasoning: { type: 'reasoning_effort', level: 'low' } }, | ||
| }, | ||
| 'glm-5': { | ||
| zai: { modelId: 'glm-5', reasoning: { type: 'none' } }, | ||
|
|
@@ -443,6 +474,7 @@ export const DEFAULT_MODEL_EQUIVALENCES: Record<string, Partial<Record<BuiltinPr | |
| groq: { modelId: 'llama-3.3-70b-versatile', reasoning: { type: 'none' } }, | ||
| xai: { modelId: 'grok-3-mini', reasoning: { type: 'reasoning_effort', level: 'medium' } }, | ||
| zai: { modelId: 'glm-4.7', reasoning: { type: 'none' } }, | ||
| minimax: { modelId: 'minimax-m2.7', reasoning: { type: 'none' } }, | ||
| }, | ||
| 'haiku': { | ||
| anthropic: { modelId: 'claude-haiku-4-5-20251001', reasoning: { type: 'none' } }, | ||
|
|
@@ -451,6 +483,7 @@ export const DEFAULT_MODEL_EQUIVALENCES: Record<string, Partial<Record<BuiltinPr | |
| mistral: { modelId: 'mistral-small-latest', reasoning: { type: 'none' } }, | ||
| groq: { modelId: 'llama-3.3-70b-versatile', reasoning: { type: 'none' } }, | ||
| zai: { modelId: 'glm-4.5-flash', reasoning: { type: 'none' } }, | ||
| minimax: { modelId: 'minimax-m2.7-highspeed', reasoning: { type: 'none' } }, | ||
| }, | ||
| // ── OpenAI models ───────────────────────────────────────────────────────── | ||
| 'gpt-5.3-codex': { | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -61,6 +61,12 @@ export const PROVIDER_REGISTRY: ProviderInfo[] = [ | |||||||||||||||||||||
| authMethods: ['api-key'], envVars: ['AZURE_OPENAI_API_KEY'], | ||||||||||||||||||||||
| configFields: ['baseUrl'], | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| id: 'minimax', name: 'MiniMax', description: 'MiniMax M2.7, M2.7-highspeed and M2.5 models', | ||||||||||||||||||||||
| category: 'popular', | ||||||||||||||||||||||
| authMethods: ['api-key'], envVars: ['MINIMAX_API_KEY'], | ||||||||||||||||||||||
| configFields: ['baseUrl'], website: 'https://platform.minimax.io', | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
|
Comment on lines
+65
to
+69
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Provider description omits Line 65 is missing one currently supported MiniMax model, which makes the UI description inconsistent with the model catalog. ✏️ Suggested text fix- id: 'minimax', name: 'MiniMax', description: 'MiniMax M2.7, M2.7-highspeed and M2.5 models',
+ id: 'minimax', name: 'MiniMax', description: 'MiniMax M2.7, M2.7-highspeed, M2.5, and M2.5-highspeed models',📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
| { | ||||||||||||||||||||||
| id: 'ollama', name: 'Ollama', description: 'Local open-source models', | ||||||||||||||||||||||
| category: 'local', | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ export type CredentialSource = 'oauth' | 'api-key' | 'env' | 'keychain'; | |
| export type BuiltinProvider = | ||
| | 'anthropic' | 'openai' | 'google' | 'amazon-bedrock' | 'azure' | ||
| | 'mistral' | 'groq' | 'xai' | 'openrouter' | 'zai' | ||
| | 'ollama' | 'openai-compatible'; | ||
| | 'minimax' | 'ollama' | 'openai-compatible'; | ||
|
|
||
| export type BillingModel = 'subscription' | 'pay-per-use'; | ||
|
|
||
|
Comment on lines
7
to
13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The Suggested FixAdd the missing Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -284,6 +284,8 @@ export interface AppSettings { | |
| globalAzureApiKey?: string; | ||
| globalAzureBaseUrl?: string; | ||
| globalBedrockRegion?: string; | ||
| globalZAIApiKey?: string; | ||
| globalMiniMaxApiKey?: string; | ||
|
Comment on lines
+287
to
+288
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Add new API key fields to The new // In apps/desktop/src/shared/constants/config.ts DEFAULT_APP_SETTINGS:
globalZAIApiKey: undefined as string | undefined,
globalMiniMaxApiKey: undefined as string | undefined,This ensures consistent initialization across settings resets and first-launch scenarios. 🤖 Prompt for AI Agents |
||
| // Unified provider accounts (multi-provider) | ||
| providerAccounts?: ProviderAccount[]; | ||
| /** Global priority order — array of ProviderAccount IDs. First = highest priority. */ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.