Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
15 changes: 15 additions & 0 deletions packages/db/src/etl/normalizers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,21 @@ describe('resolveModelKey', () => {
expect(resolveModelKey({ infmax_model_prefix: 'dsv4pro-fp8' })).toBe('dsv4');
});

it('resolves AMD Kimi-K2.7-Code identifiers to the canonical kimik2.7-code key', () => {
// AMD AgentX sweeps emit the bare prefix `kimik2.7` (no `-code`) and the
// MXFP4 model path `amd/Kimi-K2.7-Code-MXFP4`; both must fold into the
// canonical `kimik2.7-code` DB bucket. Regression for GitHub Actions run
// 29975243963, whose overlay rendered nothing because every row was skipped
// as an unmapped model.
expect(resolveModelKey({ infmax_model_prefix: 'kimik2.7' })).toBe('kimik2.7-code');
expect(resolveModelKey({ infmax_model_prefix: 'kimik2.7-fp4' })).toBe('kimik2.7-code');
expect(resolveModelKey({ model_prefix: 'kimik2.7' })).toBe('kimik2.7-code');
expect(resolveModelKey({ model: 'amd/Kimi-K2.7-Code-MXFP4' })).toBe('kimik2.7-code');
// Canonical identifiers still resolve to the same bucket.
expect(resolveModelKey({ infmax_model_prefix: 'kimik2.7-code' })).toBe('kimik2.7-code');
expect(resolveModelKey({ model: 'moonshotai/Kimi-K2.7-Code' })).toBe('kimik2.7-code');
});

it('falls back to MODEL_TO_KEY when prefix not present', () => {
expect(resolveModelKey({ model: 'deepseek-ai/DeepSeek-R1' })).toBe('dsr1');
expect(resolveModelKey({ model: 'nvidia/Llama-3.3-70B-Instruct-FP8' })).toBe('llama70b');
Expand Down
5 changes: 5 additions & 0 deletions packages/db/src/etl/normalizers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ const PRECISION_SUFFIX = /-(?:fp4|fp8|mxfp4|nvfp4)(?:-.*)?$/iu;
const PREFIX_ALIASES: Record<string, string> = {
gptoss: 'gptoss120b',
dsv4pro: 'dsv4',
// AMD AgentX sweeps emit the bare prefix `kimik2.7` instead of the canonical
// `kimik2.7-code` DB key; alias it so those rows resolve (and precision-suffixed
// forms like `kimik2.7-fp4` fold in via PRECISION_SUFFIX stripping too).
'kimik2.7': 'kimik2.7-code',
};

function resolvePrefixToKey(prefix: string): string | null {
Expand Down Expand Up @@ -94,6 +98,7 @@ export const MODEL_TO_KEY: Record<string, string> = {
'moonshotai/Kimi-K2.5': 'kimik2.5',
'moonshotai/Kimi-K2.6': 'kimik2.6',
'moonshotai/Kimi-K2.7-Code': 'kimik2.7-code',
'amd/Kimi-K2.7-Code-MXFP4': 'kimik2.7-code',
// MiniMax-M2.5
'MiniMaxAI/MiniMax-M2.5': 'minimaxm2.5',
// MiniMax-M3 (428B, distinct architecture from the M2 series)
Expand Down
Loading