diff --git a/docs/adding-entities.md b/docs/adding-entities.md index d53a148b..dba7155d 100644 --- a/docs/adding-entities.md +++ b/docs/adding-entities.md @@ -71,6 +71,15 @@ Present what you inferred and get confirmation + category in a single step. Incl Everything else (`MODEL_OPTIONS`, `DEFAULT_MODELS`, `EXPERIMENTAL_MODELS`, `DEPRECATED_MODELS`, `MODEL_PREFIX_MAPPING`, `getModelLabel()`) is derived automatically. +**`packages/app/src/lib/compare-slug.ts`** (easy to miss — the /compare and /compare-per-dollar pages do NOT derive from `MODEL_CONFIG`): + +- `COMPARE_MODEL_SLUGS` — add an entry with `{ slug, displayName, dbKeys, label }`. `displayName` must match the `Model` enum value; `dbKeys` lists the DB buckets to query. Place it per the ordering comment (Chinese-lab flagships first, newer family member leads). Without this entry the model is absent from /compare, /compare-per-dollar, the sitemap, and their OG images. +- `COMPARE_MODEL_ALIASES` — only if a family-level or older-version slug should 308 to the new entry. + +**`packages/app/src/lib/compare-ssr.ts`**: + +- `KNOWN_MODELS` — add the display name so `?g_model=` URL overrides validate on compare pages. + --- ## Featuring a Day-0 Model diff --git a/packages/app/src/lib/compare-slug.test.ts b/packages/app/src/lib/compare-slug.test.ts index ac37c81b..c984d826 100644 --- a/packages/app/src/lib/compare-slug.test.ts +++ b/packages/app/src/lib/compare-slug.test.ts @@ -43,6 +43,15 @@ describe('parseCompareSlug — new model-prefixed form', () => { expect(parsed?.b).toBe('gb200'); }); + it('parses the minimax-m3 slug as its own model, distinct from minimax-m27', () => { + const parsed = parseCompareSlug('minimax-m3-h100-vs-h200'); + expect(parsed?.model.slug).toBe('minimax-m3'); + expect(parsed?.model.dbKeys).toEqual(['minimaxm3']); + expect(parsed?.a).toBe('h100'); + expect(parsed?.b).toBe('h200'); + expect(parsed?.isAliasModel).toBe(false); + }); + it('preserves non-canonical GPU order so caller can redirect', () => { const parsed = parseCompareSlug('kimi-k26-h200-vs-h100'); expect(parsed?.a).toBe('h200'); @@ -259,6 +268,11 @@ describe('getCompareModelBySlug', () => { expect(getCompareModelBySlug('glm-5')).toBe(GLM_51); }); + it('keeps the bare minimax alias on the M2 series, with minimax-m3 canonical', () => { + expect(getCompareModelBySlug('minimax')?.slug).toBe('minimax-m27'); + expect(getCompareModelBySlug('minimax-m3')?.slug).toBe('minimax-m3'); + }); + it('returns null for unknown slugs', () => { expect(getCompareModelBySlug('nonexistent')).toBeNull(); }); diff --git a/packages/app/src/lib/compare-slug.ts b/packages/app/src/lib/compare-slug.ts index 6d49bb97..831c22a3 100644 --- a/packages/app/src/lib/compare-slug.ts +++ b/packages/app/src/lib/compare-slug.ts @@ -31,10 +31,12 @@ export interface CompareModelSlug { } // Order matches the master /compare and /compare-per-dollar index display: -// DeepSeek V4 Pro → R1 → Kimi → GLM → MiniMax → Qwen → gpt-oss → Llama 70B. -// Per product spec — flagship Chinese-developed models first, smaller open -// US-developed models at the bottom. Qwen sits between MiniMax and gpt-oss to -// keep the Chinese-lab cluster contiguous before the US transition. +// DeepSeek V4 Pro → R1 → Kimi → GLM → MiniMax M3 → MiniMax M2 → Qwen → +// gpt-oss → Llama 70B. Per product spec — flagship Chinese-developed models +// first, smaller open US-developed models at the bottom. Qwen sits between +// MiniMax and gpt-oss to keep the Chinese-lab cluster contiguous before the +// US transition. Within a family the newer flagship leads (V4 Pro before R1, +// M3 before M2.5/M2.7). export const COMPARE_MODEL_SLUGS: CompareModelSlug[] = [ { slug: 'deepseek-v4', @@ -69,6 +71,14 @@ export const COMPARE_MODEL_SLUGS: CompareModelSlug[] = [ dbKeys: ['glm5.1', 'glm5'], label: 'GLM 5/5.1', }, + { + slug: 'minimax-m3', + displayName: 'MiniMax-M3', + // M3 is a new 428B architecture, not a point release of the M2 series, so + // it gets its own slug rather than joining the minimax-m27 dbKey group. + dbKeys: ['minimaxm3'], + label: 'MiniMax M3 428B', + }, { slug: 'minimax-m27', displayName: 'MiniMax-M2.5', diff --git a/packages/app/src/lib/compare-ssr.ts b/packages/app/src/lib/compare-ssr.ts index e6e87dd7..1a2ce660 100644 --- a/packages/app/src/lib/compare-ssr.ts +++ b/packages/app/src/lib/compare-ssr.ts @@ -68,6 +68,7 @@ export const KNOWN_MODELS = new Set([ 'Qwen-3.5-397B-A17B', 'Kimi-K2.5', 'MiniMax-M2.5', + 'MiniMax-M3', 'GLM-5', 'DeepSeek-V4-Pro', ]);