Skip to content

Commit ef805c3

Browse files
committed
chore(scripts): let jawcode metadata carry video input
MiniMax-M3 accepts video, and the jawcode source now says so (jawcode 762549f), so widen the generator's input-modality type and the type it emits from ("text" | "image")[] to ("text" | "image" | "video")[]. Type-only. RawModel.input is consumed via input.join(","), the row field is string | null, and rowToMetadata casts unchecked — so tsc passes either way. This keeps the declared type honest rather than fixing a compile error. src/generated/jawcode-model-metadata.ts is deliberately NOT regenerated here. That file is already 95 models / 63 price rows out of sync with its source, so a regeneration would sweep unrelated price changes into cost accounting alongside one modality fix. The resync is its own unit of work, with the delta reviewed on its own merits and a drift guard added; the M3 video row lands there as a clean one-row delta. Reported as lidge-jun#706, which proposed the same type widening but hand-edited the generated file and also swapped MiniMax's discounted rates for list prices.
1 parent 275345a commit ef805c3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/generate-jawcode-metadata.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type RawModel = {
88
id?: string;
99
contextWindow?: number;
1010
maxTokens?: number;
11-
input?: ("text" | "image")[];
11+
input?: ("text" | "image" | "video")[];
1212
reasoning?: boolean;
1313
wireModelId?: string;
1414
cost?: {
@@ -60,7 +60,7 @@ lines.push(" provider: string;");
6060
lines.push(" id: string;");
6161
lines.push(" contextWindow?: number;");
6262
lines.push(" maxTokens?: number;");
63-
lines.push(" input?: (\"text\" | \"image\")[];");
63+
lines.push(" input?: (\"text\" | \"image\" | \"video\")[];");
6464
lines.push(" reasoning?: boolean;");
6565
lines.push(" wireModelId?: string;");
6666
lines.push(" cost?: { input: number; output: number; cacheRead: number; cacheWrite: number };");
@@ -136,7 +136,7 @@ lines.push(" return {");
136136
lines.push(" provider, id,");
137137
lines.push(" ...(contextWindow != null ? { contextWindow } : {}),");
138138
lines.push(" ...(maxTokens != null ? { maxTokens } : {}),");
139-
lines.push(" ...(input ? { input: input.split(\",\") as (\"text\" | \"image\")[] } : {}),");
139+
lines.push(" ...(input ? { input: input.split(\",\") as (\"text\" | \"image\" | \"video\")[] } : {}),");
140140
lines.push(" ...(reasoning != null ? { reasoning: reasoning === 1 } : {}),");
141141
lines.push(" ...(wireModelId != null ? { wireModelId } : {}),");
142142
lines.push(" ...(hasCost ? { cost: { input: costInput, output: costOutput, cacheRead: costCacheRead, cacheWrite: costCacheWrite } } : {}),");

0 commit comments

Comments
 (0)