Skip to content

Commit 746a26f

Browse files
authored
refactor(minimax): update MiniMax model configurations (#12910)
### What this PR does Before this PR: - MiniMax provider used outdated abab model series (abab6.5s, abab6.5g, abab6.5t, abab5.5s, minimax-text-01) - Some models had inconsistent naming After this PR: - Updated to new M2.x series models (MiniMax-M2.5, MiniMax-M2.5-lightning, MiniMax-M2.1, MiniMax-M2.1-lightning, MiniMax-M2, M2-her) - Consistent naming and grouping for all models - Added M2-her model logo mapping ### Why we need it and why it was done in this way MiniMax has updated their model lineup, and the old abab series models are outdated. This PR updates the default model configurations to reflect the current available models. The following tradeoffs were made: - None The following alternatives were considered: - None ### Breaking changes None. Existing users will have their MiniMax models automatically migrated to the new configuration via migration 198. ### Special notes for your reviewer The migration ensures existing users get the updated model list without losing their provider settings. ### Checklist - [x] PR: The PR description is expressive enough and will help future contributors - [x] Code: Write code that humans can understand and Keep it simple - [x] Refactor: You have left the code cleaner than you found it (Boy Scout Rule) - [x] Upgrade: Impact of this change on upgrade flows was considered and addressed if required - [ ] Documentation: Not required for this change ### Release note ```release-note Updated MiniMax model configurations to use the latest M2.x series models ```
1 parent fc7e374 commit 746a26f

File tree

5 files changed

+34
-31
lines changed

5 files changed

+34
-31
lines changed

src/renderer/src/config/models/default.ts

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -952,52 +952,40 @@ export const SYSTEM_MODELS: Record<SystemProviderId | 'defaultModel', Model[]> =
952952
],
953953
minimax: [
954954
{
955-
id: 'abab6.5s-chat',
955+
id: 'MiniMax-M2.5',
956956
provider: 'minimax',
957-
name: 'abab6.5s',
958-
group: 'abab6'
957+
name: 'MiniMax-M2.5',
958+
group: 'M2.5'
959959
},
960960
{
961-
id: 'abab6.5g-chat',
961+
id: 'MiniMax-M2.5-lightning',
962962
provider: 'minimax',
963-
name: 'abab6.5g',
964-
group: 'abab6'
963+
name: 'MiniMax-M2.5-lightning',
964+
group: 'M2.5'
965965
},
966966
{
967-
id: 'abab6.5t-chat',
968-
provider: 'minimax',
969-
name: 'abab6.5t',
970-
group: 'abab6'
971-
},
972-
{
973-
id: 'abab5.5s-chat',
967+
id: 'MiniMax-M2.1',
974968
provider: 'minimax',
975-
name: 'abab5.5s',
976-
group: 'abab5'
969+
name: 'MiniMax-M2.1',
970+
group: 'M2.1'
977971
},
978972
{
979-
id: 'minimax-text-01',
973+
id: 'MiniMax-M2.1-lightning',
980974
provider: 'minimax',
981-
name: 'minimax-01',
982-
group: 'minimax-01'
975+
name: 'MiniMax-M2.1-lightning',
976+
group: 'M2.1'
983977
},
984978
{
985979
id: 'MiniMax-M2',
986980
provider: 'minimax',
987-
name: 'MiniMax M2',
988-
group: 'minimax-m2'
981+
name: 'MiniMax-M2',
982+
group: 'M2'
989983
},
990984
{
991-
id: 'MiniMax-M2-Stable',
992-
provider: 'minimax',
993-
name: 'MiniMax M2 Stable',
994-
group: 'minimax-m2'
995-
},
996-
{
997-
id: 'MiniMax-M2.1',
985+
id: 'M2-her',
998986
provider: 'minimax',
999-
name: 'MiniMax M2.1',
1000-
group: 'minimax-m2'
987+
name: 'M2-her',
988+
group: 'M2'
1001989
}
1002990
],
1003991
hyperbolic: [

src/renderer/src/config/models/logo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export function getModelLogoById(modelId: string): string | undefined {
177177
jina: isLight ? JinaModelLogo : JinaModelLogoDark,
178178
abab: isLight ? MinimaxModelLogo : MinimaxModelLogoDark,
179179
minimax: isLight ? MinimaxModelLogo : MinimaxModelLogoDark,
180+
'm2-her': isLight ? MinimaxModelLogo : MinimaxModelLogoDark,
180181
veo: isLight ? GeminiModelLogo : GeminiModelLogoDark,
181182
o1: isLight ? ChatGPTo1ModelLogo : ChatGPTo1ModelLogoDark,
182183
o3: isLight ? ChatGPTo1ModelLogo : ChatGPTo1ModelLogoDark,

src/renderer/src/config/providers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ export const SYSTEM_PROVIDERS_CONFIG: Record<SystemProviderId, SystemProvider> =
470470
name: 'MiniMax',
471471
type: 'openai',
472472
apiKey: '',
473-
apiHost: 'https://api.minimaxi.com/v1',
473+
apiHost: 'https://api.minimaxi.com/v1/',
474474
anthropicApiHost: 'https://api.minimaxi.com/anthropic',
475475
models: SYSTEM_MODELS.minimax,
476476
isSystem: true,

src/renderer/src/store/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const persistedReducer = persistReducer(
8686
{
8787
key: 'cherry-studio',
8888
storage,
89-
version: 197,
89+
version: 198,
9090
blacklist: ['runtime', 'messages', 'messageBlocks', 'tabs', 'toolPermissions'],
9191
migrate
9292
},

src/renderer/src/store/migrate.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3230,6 +3230,20 @@ const migrateConfig = {
32303230
logger.error('migrate 197 error', error as Error)
32313231
return state
32323232
}
3233+
},
3234+
'198': (state: RootState) => {
3235+
try {
3236+
state.llm.providers.forEach((provider) => {
3237+
if (provider.id === 'minimax') {
3238+
provider.models = SYSTEM_MODELS['minimax']
3239+
provider.apiHost = 'https://api.minimaxi.com/v1/'
3240+
}
3241+
})
3242+
return state
3243+
} catch (error) {
3244+
logger.error('migrate 198 error', error as Error)
3245+
return state
3246+
}
32333247
}
32343248
}
32353249

0 commit comments

Comments
 (0)