Skip to content

Commit 8f06f67

Browse files
octo-patchocto-patchSebConejo
authored
feat: add MiniMax-M2.7 and MiniMax-M2.7-highspeed model support (#1570)
* 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 * fix: update subscription fallback test for M2.7 models Add MiniMax-M2.7 and MiniMax-M2.7-highspeed to the expected model list in buildSubscriptionFallbackModels test assertion. --------- Co-authored-by: octo-patch <octo-patch@github.com> Co-authored-by: Sébastien Conejo <sebastien@buddyweb.fr>
1 parent bc7653a commit 8f06f67

File tree

8 files changed

+25
-4
lines changed

8 files changed

+25
-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-discovery/model-discovery.service.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,8 @@ describe('ModelDiscoveryService', () => {
17591759
const result = buildSubscriptionFallbackModels(null as never, 'minimax');
17601760

17611761
expect(result.map((m) => m.id)).toEqual([
1762+
'MiniMax-M2.7',
1763+
'MiniMax-M2.7-highspeed',
17621764
'MiniMax-M2.5',
17631765
'MiniMax-M2.5-highspeed',
17641766
'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
@@ -127,7 +127,7 @@ export const PROVIDERS: ProviderDef[] = [
127127
name: 'MiniMax',
128128
color: '#E73562',
129129
initial: 'Mm',
130-
subtitle: 'MiniMax M2.5, M1, M2',
130+
subtitle: 'MiniMax M2.7, M2.5, M1',
131131
keyPrefix: 'sk-',
132132
minKeyLength: 30,
133133
keyPlaceholder: 'sk-...',

packages/shared/__tests__/subscription.spec.ts

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

165+
it('returns known models for minimax including M2.7', () => {
166+
const models = getSubscriptionKnownModels('minimax');
167+
expect(models).toContain('MiniMax-M2.7');
168+
expect(models).toContain('MiniMax-M2.7-highspeed');
169+
expect(models).toContain('MiniMax-M2.5');
170+
});
171+
165172
it('returns null known models for ollama-cloud (relies on live /api/tags discovery)', () => {
166173
const models = getSubscriptionKnownModels('ollama-cloud');
167174
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)