Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ describe('PurgeNonCuratedModels1772960000000', () => {
expect(params).toContain('gpt-4o');
expect(params).toContain('openrouter/auto');
expect(params).toContain('glm-4-flash');
expect(params.length).toBe(68);
expect(params).toContain('minimax-m2.7');
expect(params).toContain('minimax-m2.7-highspeed');
expect(params.length).toBe(70);
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ const CURATED_MODELS = [
'openrouter/free',
'minimax/minimax-m2.5',
'minimax/minimax-m1',
'minimax-m2.7',
'minimax-m2.7-highspeed',
'minimax-m2.5',
'minimax-m2.5-highspeed',
'minimax-m2.1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ describe('model-name-normalizer', () => {
});

it('includes MiniMax mixed-case aliases', () => {
const map = buildAliasMap(['minimax-m2.5', 'minimax-m1']);
const map = buildAliasMap(['minimax-m2.7', 'minimax-m2.5', 'minimax-m1']);
expect(map.get('MiniMax-M2.7')).toBe('minimax-m2.7');
expect(map.get('MiniMax-M2.7-highspeed')).toBe('minimax-m2.7-highspeed');
expect(map.get('MiniMax-M2.5')).toBe('minimax-m2.5');
expect(map.get('MiniMax-M1')).toBe('minimax-m1');
});
Expand Down Expand Up @@ -234,7 +236,9 @@ describe('model-name-normalizer', () => {
});

it('resolves MiniMax mixed-case alias', () => {
const map = buildAliasMap(['minimax-m2.5', 'minimax-m1']);
const map = buildAliasMap(['minimax-m2.7', 'minimax-m2.5', 'minimax-m1']);
expect(resolveModelName('MiniMax-M2.7', map)).toBe('minimax-m2.7');
expect(resolveModelName('MiniMax-M2.7-highspeed', map)).toBe('minimax-m2.7-highspeed');
expect(resolveModelName('MiniMax-M2.5', map)).toBe('minimax-m2.5');
});

Expand Down
2 changes: 2 additions & 0 deletions packages/backend/src/model-prices/model-name-normalizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const KNOWN_ALIASES: ReadonlyArray<readonly [string, string]> = [
['deepseek-chat-v3-0324', 'deepseek-chat'],
['deepseek-r1', 'deepseek-reasoner'],
// MiniMax mixed-case aliases
['MiniMax-M2.7', 'minimax-m2.7'],
['MiniMax-M2.7-highspeed', 'minimax-m2.7-highspeed'],
['MiniMax-M2.5', 'minimax-m2.5'],
['MiniMax-M2.5-highspeed', 'minimax-m2.5-highspeed'],
['MiniMax-M2.1', 'minimax-m2.1'],
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/services/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export const PROVIDERS: ProviderDef[] = [
name: 'MiniMax',
color: '#E73562',
initial: 'Mm',
subtitle: 'MiniMax M2.5, M1, M2',
subtitle: 'MiniMax M2.7, M2.5, M1',
keyPrefix: 'sk-',
minKeyLength: 30,
keyPlaceholder: 'sk-...',
Expand Down
7 changes: 7 additions & 0 deletions packages/shared/__tests__/subscription.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ describe('getSubscriptionKnownModels', () => {
expect(models).toContain('copilot/gpt-5.4');
});

it('returns known models for minimax including M2.7', () => {
const models = getSubscriptionKnownModels('minimax');
expect(models).toContain('MiniMax-M2.7');
expect(models).toContain('MiniMax-M2.7-highspeed');
expect(models).toContain('MiniMax-M2.5');
});

it('returns null known models for ollama-cloud (relies on live /api/tags discovery)', () => {
const models = getSubscriptionKnownModels('ollama-cloud');
expect(models).toBeNull();
Expand Down
2 changes: 2 additions & 0 deletions packages/shared/src/subscription/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const SUBSCRIPTION_PROVIDER_CONFIGS: Readonly<
subscriptionLabel: 'MiniMax Coding Plan',
subscriptionAuthMode: 'device_code' as const,
knownModels: Object.freeze([
'MiniMax-M2.7',
'MiniMax-M2.7-highspeed',
'MiniMax-M2.5',
'MiniMax-M2.5-highspeed',
'MiniMax-M2.1',
Expand Down
Loading