From 45fc6c2afde7ee81e35afe80376528acd9e4c2aa Mon Sep 17 00:00:00 2001 From: Phantom Date: Fri, 14 Nov 2025 10:55:41 +0800 Subject: [PATCH] fix: minimax new api host & anthropic api support (#11269) * feat(models): add MiniMax M2 models to default configuration * fix(config): update minimax api host and add anthropic host Update the API endpoint for MiniMax provider and add a new endpoint for Anthropic integration * feat: add minimax to ANTHROPIC_COMPATIBLE_PROVIDER_IDS * docs(ProviderSetting): add todo comment for reset button * fix(store): update minimax provider config in migration 174 Add anthropicApiHost to minimax provider configuration during state migration * fix(store): revert version and remove unused migration Remove migration for version 175 and revert persisted reducer version to 174 --- src/renderer/src/config/models/default.ts | 12 ++++++++++++ src/renderer/src/config/providers.ts | 5 +++-- .../settings/ProviderSettings/ProviderSetting.tsx | 4 +++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/config/models/default.ts b/src/renderer/src/config/models/default.ts index ea149d3799..3adf0da53d 100644 --- a/src/renderer/src/config/models/default.ts +++ b/src/renderer/src/config/models/default.ts @@ -1003,6 +1003,18 @@ export const SYSTEM_MODELS: Record = provider: 'minimax', name: 'minimax-01', group: 'minimax-01' + }, + { + id: 'MiniMax-M2', + provider: 'minimax', + name: 'MiniMax M2', + group: 'minimax-m2' + }, + { + id: 'MiniMax-M2-Stable', + provider: 'minimax', + name: 'MiniMax M2 Stable', + group: 'minimax-m2' } ], hyperbolic: [ diff --git a/src/renderer/src/config/providers.ts b/src/renderer/src/config/providers.ts index 04ef107d14..965c620ba9 100644 --- a/src/renderer/src/config/providers.ts +++ b/src/renderer/src/config/providers.ts @@ -472,7 +472,8 @@ export const SYSTEM_PROVIDERS_CONFIG: Record = name: 'MiniMax', type: 'openai', apiKey: '', - apiHost: 'https://api.minimax.com/v1/', + apiHost: 'https://api.minimaxi.com/v1', + anthropicApiHost: 'https://api.minimaxi.com/anthropic', models: SYSTEM_MODELS.minimax, isSystem: true, enabled: false @@ -1072,7 +1073,7 @@ export const PROVIDER_URLS: Record = { }, minimax: { api: { - url: 'https://api.minimax.com/v1/' + url: 'https://api.minimaxi.com/v1/' }, websites: { official: 'https://platform.minimaxi.com/', diff --git a/src/renderer/src/pages/settings/ProviderSettings/ProviderSetting.tsx b/src/renderer/src/pages/settings/ProviderSettings/ProviderSetting.tsx index f135d83e40..cdd71936fb 100644 --- a/src/renderer/src/pages/settings/ProviderSettings/ProviderSetting.tsx +++ b/src/renderer/src/pages/settings/ProviderSettings/ProviderSetting.tsx @@ -81,7 +81,8 @@ const ANTHROPIC_COMPATIBLE_PROVIDER_IDS = [ SystemProviderIds.aihubmix, SystemProviderIds.grok, SystemProviderIds.cherryin, - SystemProviderIds.longcat + SystemProviderIds.longcat, + SystemProviderIds.minimax ] as const type AnthropicCompatibleProviderId = (typeof ANTHROPIC_COMPATIBLE_PROVIDER_IDS)[number] @@ -547,6 +548,7 @@ const ProviderSetting: FC = ({ providerId }) => { onChange={(e) => setAnthropicHost(e.target.value)} onBlur={onUpdateAnthropicHost} /> + {/* TODO: Add a reset button here. */}