Skip to content

Commit be89176

Browse files
author
octo-patch
committed
feat: add MiniMax-M2.7 and MiniMax-M2.7-highspeed model support
- Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to KNOWN_ALIASES in model-name-normalizer for mixed-case resolution - Add both models to minimax subscription knownModels config - Add minimax-m2.7 and minimax-m2.7-highspeed to curated model list in PurgeNonCuratedModels migration - Update MiniMax provider subtitle to reference M2.7 as the latest - Update tests to cover new M2.7 alias resolution
1 parent acd3284 commit be89176

File tree

7 files changed

+23
-4
lines changed

7 files changed

+23
-4
lines changed

packages/backend/src/database/migrations/1772960000000-PurgeNonCuratedModels.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ describe('PurgeNonCuratedModels1772960000000', () => {
4747
expect(params).toContain('gpt-4o');
4848
expect(params).toContain('openrouter/auto');
4949
expect(params).toContain('glm-4-flash');
50-
expect(params.length).toBe(68);
50+
expect(params).toContain('minimax-m2.7');
51+
expect(params).toContain('minimax-m2.7-highspeed');
52+
expect(params.length).toBe(70);
5153
});
5254
});
5355

packages/backend/src/database/migrations/1772960000000-PurgeNonCuratedModels.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ const CURATED_MODELS = [
5151
'openrouter/free',
5252
'minimax/minimax-m2.5',
5353
'minimax/minimax-m1',
54+
'minimax-m2.7',
55+
'minimax-m2.7-highspeed',
5456
'minimax-m2.5',
5557
'minimax-m2.5-highspeed',
5658
'minimax-m2.1',

packages/backend/src/model-prices/model-name-normalizer.spec.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ describe('model-name-normalizer', () => {
136136
});
137137

138138
it('includes MiniMax mixed-case aliases', () => {
139-
const map = buildAliasMap(['minimax-m2.5', 'minimax-m1']);
139+
const map = buildAliasMap(['minimax-m2.7', 'minimax-m2.5', 'minimax-m1']);
140+
expect(map.get('MiniMax-M2.7')).toBe('minimax-m2.7');
141+
expect(map.get('MiniMax-M2.7-highspeed')).toBe('minimax-m2.7-highspeed');
140142
expect(map.get('MiniMax-M2.5')).toBe('minimax-m2.5');
141143
expect(map.get('MiniMax-M1')).toBe('minimax-m1');
142144
});
@@ -234,7 +236,9 @@ describe('model-name-normalizer', () => {
234236
});
235237

236238
it('resolves MiniMax mixed-case alias', () => {
237-
const map = buildAliasMap(['minimax-m2.5', 'minimax-m1']);
239+
const map = buildAliasMap(['minimax-m2.7', 'minimax-m2.5', 'minimax-m1']);
240+
expect(resolveModelName('MiniMax-M2.7', map)).toBe('minimax-m2.7');
241+
expect(resolveModelName('MiniMax-M2.7-highspeed', map)).toBe('minimax-m2.7-highspeed');
238242
expect(resolveModelName('MiniMax-M2.5', map)).toBe('minimax-m2.5');
239243
});
240244

packages/backend/src/model-prices/model-name-normalizer.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ const KNOWN_ALIASES: ReadonlyArray<readonly [string, string]> = [
3030
['deepseek-chat-v3-0324', 'deepseek-chat'],
3131
['deepseek-r1', 'deepseek-reasoner'],
3232
// MiniMax mixed-case aliases
33+
['MiniMax-M2.7', 'minimax-m2.7'],
34+
['MiniMax-M2.7-highspeed', 'minimax-m2.7-highspeed'],
3335
['MiniMax-M2.5', 'minimax-m2.5'],
3436
['MiniMax-M2.5-highspeed', 'minimax-m2.5-highspeed'],
3537
['MiniMax-M2.1', 'minimax-m2.1'],

packages/frontend/src/services/providers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const PROVIDERS: ProviderDef[] = [
119119
name: 'MiniMax',
120120
color: '#E73562',
121121
initial: 'Mm',
122-
subtitle: 'MiniMax M2.5, M1, M2',
122+
subtitle: 'MiniMax M2.7, M2.5, M1',
123123
keyPrefix: 'sk-',
124124
minKeyLength: 30,
125125
keyPlaceholder: 'sk-...',

packages/shared/__tests__/subscription.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ describe('getSubscriptionKnownModels', () => {
133133
expect(models).toContain('copilot/gpt-5.4');
134134
});
135135

136+
it('returns known models for minimax including M2.7', () => {
137+
const models = getSubscriptionKnownModels('minimax');
138+
expect(models).toContain('MiniMax-M2.7');
139+
expect(models).toContain('MiniMax-M2.7-highspeed');
140+
expect(models).toContain('MiniMax-M2.5');
141+
});
142+
136143
it('returns null known models for ollama-cloud (relies on live /api/tags discovery)', () => {
137144
const models = getSubscriptionKnownModels('ollama-cloud');
138145
expect(models).toBeNull();

packages/shared/src/subscription/configs.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export const SUBSCRIPTION_PROVIDER_CONFIGS: Readonly<
4141
subscriptionLabel: 'MiniMax Coding Plan',
4242
subscriptionAuthMode: 'device_code' as const,
4343
knownModels: Object.freeze([
44+
'MiniMax-M2.7',
45+
'MiniMax-M2.7-highspeed',
4446
'MiniMax-M2.5',
4547
'MiniMax-M2.5-highspeed',
4648
'MiniMax-M2.1',

0 commit comments

Comments
 (0)