{"record":{"id":"2fd836dcb8dfa1bb","repo":"remotion-dev/remotion","slug":"unknown-whisper-model-modelname","errorCode":null,"errorMessage":"Unknown Whisper model: ${modelName}.","messagePattern":"Unknown Whisper model: (.+?)\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/WebMcp.tsx","lineNumber":521,"sourceCode":"\t\t\t\t\t\t});\n\t\t\t\t\t\tconst fileType = getPreviewFileType(assetPath);\n\t\t\t\t\t\tif (fileType !== 'audio' && fileType !== 'video') {\n\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t'The transcription asset must be audio or video.',\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst whisper = await import('@remotion/whisper-webgpu');\n\t\t\t\t\t\tconst modelName = input.model ?? 'small.en';\n\t\t\t\t\t\tif (typeof modelName !== 'string') {\n\t\t\t\t\t\t\tthrow new Error('model must be a string.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst model = whisper\n\t\t\t\t\t\t\t.getAvailableModels()\n\t\t\t\t\t\t\t.find((candidate) => candidate.name === modelName);\n\t\t\t\t\t\tif (!model) {\n\t\t\t\t\t\t\tthrow new Error(`Unknown Whisper model: ${modelName}.`);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst task = input.task ?? 'transcribe';\n\t\t\t\t\t\tif (task !== 'transcribe' && task !== 'translate') {\n\t\t\t\t\t\t\tthrow new Error('task must be transcribe or translate.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (task === 'translate' && !model.supportsTranslation) {\n\t\t\t\t\t\t\tthrow new Error(`${model.name} does not support translation.`);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst language = input.language ?? 'en';\n\t\t\t\t\t\tif (typeof language !== 'string' || language.length === 0) {\n\t\t\t\t\t\t\tthrow new Error('language must be a non-empty string.');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst chunkLengthInSeconds = input.chunkLengthInSeconds ?? 30;\n\t\t\t\t\t\tconst strideLengthInSeconds = input.strideLengthInSeconds ?? 5;","sourceCodeStart":503,"sourceCodeEnd":539,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/studio/src/components/WebMcp.tsx#L503-L539","documentation":"This error is thrown by the WebMcp caption/transcription tool handler in Remotion Studio when the requested Whisper model name does not match any entry from getAvailableModels(). The library validates the `model` input against the known model catalog before starting a transcription job, and fails fast when the model cannot be resolved.","triggerScenarios":"Calling the WebMcp whisper transcription tool with input.model set to a name that is not an exact match (case-sensitive) of one of whisper.getAvailableModels()' `name` fields, e.g. \"whisper-tiny\" vs \"tiny\", \"Whisper-Tiny\", or a typo.","commonSituations":"Hand-typing a model name into an MCP tool call instead of first listing available models; copying a HuggingFace model id like \"Xenova/whisper-tiny.en\" when the tool expects just \"tiny.en\"; casing mistakes.","solutions":["Call the tool with the list-models / equivalent query to get valid names from whisper.getAvailableModels() and use one exactly","Use one of the known model names: tiny, tiny.en, base, base.en, small, small.en, medium, medium.en, large-v3, etc., matching the catalog exactly","Fix casing and remove any org prefix from the model name"],"exampleFix":"// before\n{ \"tool\": \"transcribe-captions\", \"input\": { \"model\": \"Xenova/whisper-tiny.en\" } }\n// after\n{ \"tool\": \"transcribe-captions\", \"input\": { \"model\": \"tiny.en\" } }","handlingStrategy":"validation","validationCode":"const validModels = whisper.getAvailableModels().map((m) => m.name);\nif (!validModels.includes(input.model)) {\n  throw new Error(`model must be one of: ${validModels.join(', ')}`);\n}","typeGuard":"const isKnownModel = (name: string): boolean =>\n  whisper.getAvailableModels().some((m) => m.name === name);","tryCatchPattern":"try {\n  await callWhisperTool({ model: input.model });\n} catch (err) {\n  if (err instanceof Error && err.message.startsWith('Unknown Whisper model')) {\n    const names = whisper.getAvailableModels().map((m) => m.name);\n    console.warn(`Bad model \"${input.model}\"; valid: ${names.join(', ')}`);\n  }\n}","preventionTips":["Fetch the model list from getAvailableModels() and present it as a dropdown instead of free-text input","Use the exact `name` field, not a HuggingFace repo id","Watch for case and `.en` suffix mismatches"],"tags":["validation","whisper","mcp"],"backgroundTag":"invalid-enum-value","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-09-09T13:27:51.281Z","contentChangedAt":"2026-09-09T13:27:51.281Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}