{"record":{"id":"8a8b542acb9fe190","repo":"remotion-dev/remotion","slug":"invalid-whisper-model-model-available-model","errorCode":null,"errorMessage":"Invalid whisper model ${model}. Available: ${models.join(', ')}","messagePattern":"Invalid whisper model (.+?)\\. Available: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/install-whisper-cpp/src/download-whisper-model.ts","lineNumber":58,"sourceCode":"};\n\nexport const downloadWhisperModel = async ({\n\tmodel,\n\tfolder,\n\tprintOutput = true,\n\tonProgress,\n\tsignal,\n}: {\n\tmodel: WhisperModel;\n\tfolder: string;\n\tsignal?: AbortSignal;\n\tprintOutput?: boolean;\n\tonProgress?: OnProgress;\n}): Promise<{\n\talreadyExisted: boolean;\n}> => {\n\tif (!models.includes(model)) {\n\t\tthrow new Error(\n\t\t\t`Invalid whisper model ${model}. Available: ${models.join(', ')}`,\n\t\t);\n\t}\n\n\tconst filePath = getModelPath(folder, model);\n\n\tif (existsSync(filePath)) {\n\t\tconst {size} = fs.statSync(filePath);\n\t\tif (size === modelSizes[model]) {\n\t\t\tif (printOutput) {\n\t\t\t\tconsole.log(`Model already exists at ${filePath}`);\n\t\t\t}\n\n\t\t\treturn Promise.resolve({alreadyExisted: true});\n\t\t}\n\n\t\tif (printOutput) {\n\t\t\tthrow new Error(","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/install-whisper-cpp/src/download-whisper-model.ts#L40-L76","documentation":"Thrown by @remotion/install-whisper-cpp's `downloadWhisperModel` when the `model` argument is not one of the supported model identifiers. The allowed set is fixed in source: tiny, tiny.en, base, base.en, small, small.en, medium, medium.en, large-v1, large-v2, large-v3, large-v3-turbo. Any other string is rejected before any network call.","triggerScenarios":"Calling `downloadWhisperModel({model: 'huge', ...})` ('huge' is a real whisper.cpp model name but unsupported here), or `model: 'large'` (must be versioned like 'large-v3'), or a typo such as 'medium-english'.","commonSituations":"Copying a model name from the upstream whisper.cpp docs that is not in Remotion's allow-list; using an outdated tutorial that references 'large' instead of 'large-v3'; passing a value typed loosely as string.","solutions":["Use one of the supported identifiers: tiny, tiny.en, base, base.en, small, small.en, medium, medium.en, large-v1, large-v2, large-v3, or large-v3-turbo.","Read the error message itself: it lists every available model joined by commas.","If you need a newer model, check whether a newer @remotion/install-whisper-cpp version added it."],"exampleFix":"// before\ndownloadWhisperModel({model: 'huge', folder: 'whisper'});\n\n// after\ndownloadWhisperModel({model: 'large-v3', folder: 'whisper'});","handlingStrategy":"type-guard","validationCode":"const MODELS = ['tiny','tiny.en','base','base.en','small','small.en','medium','medium.en','large-v1','large-v2','large-v3','large-v3-turbo'] as const;\nfunction isWhisperModel(m: string): m is typeof MODELS[number] {\n  return (MODELS as readonly string[]).includes(m);\n}\n\nif (!isWhisperModel(model)) throw new Error(`Unsupported model: ${model}`);","typeGuard":"const MODELS = ['tiny','tiny.en','base','base.en','small','small.en','medium','medium.en','large-v1','large-v2','large-v3','large-v3-turbo'] as const;\ntype WhisperModel = typeof MODELS[number];\nfunction isWhisperModel(m: string): m is WhisperModel {\n  return (MODELS as readonly string[]).includes(m);\n}","tryCatchPattern":null,"preventionTips":["Type the model argument as WhisperModel so the compiler rejects unknown names.","Use a versioned enum/const array rather than free-form strings from config.","When a tutorial says 'large', map it to the current 'large-v3' identifier."],"tags":["whisper","validation","ai"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}