{"record":{"id":"a18bef6d3c257658","repo":"remotion-dev/remotion","slug":"unknown-whisper-model-selectedmodel","errorCode":null,"errorMessage":"Unknown Whisper model: ${selectedModel}","messagePattern":"Unknown Whisper model: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/studio/src/components/Transcription/TranscriptionModal.tsx","lineNumber":231,"sourceCode":"\treadonly setSelectedLanguage: (language: WhisperLanguage) => void;\n\treadonly setSelectedModel: (model: WhisperWebGpuModel) => void;\n\treadonly setSelectedTask: (task: WhisperWebGpuTask) => void;\n\treadonly supportState: SupportState;\n}> = ({\n\tcachedModels,\n\tselectedLanguage,\n\tselectedModel,\n\tselectedTask,\n\tsetSelectedLanguage,\n\tsetSelectedModel,\n\tsetSelectedTask,\n\tsupportState,\n}) => {\n\tconst selectedModelInfo = AVAILABLE_MODELS.find(\n\t\t({name}) => name === selectedModel,\n\t);\n\tif (!selectedModelInfo) {\n\t\tthrow new Error(`Unknown Whisper model: ${selectedModel}`);\n\t}\n\n\tconst modelOptions = useMemo((): ComboboxValue[] => {\n\t\treturn AVAILABLE_MODELS.map((model): ComboboxValue => {\n\t\t\treturn {\n\t\t\t\ttype: 'item',\n\t\t\t\tid: model.name,\n\t\t\t\tvalue: model.name,\n\t\t\t\tlabel: `${model.name} · ${formatBytes(model.webGpuDownloadSize)}${cachedModels.has(model.name) ? ' · Downloaded' : ''}`,\n\t\t\t\tleftItem: model.name === selectedModel ? <Checkmark /> : null,\n\t\t\t\tkeyHint: null,\n\t\t\t\tquickSwitcherLabel: null,\n\t\t\t\tsubMenu: null,\n\t\t\t\tdisabled: false,\n\t\t\t\tonClick: () => setSelectedModel(model.name),\n\t\t\t};\n\t\t});\n\t}, [cachedModels, selectedModel, setSelectedModel]);","sourceCodeStart":213,"sourceCodeEnd":249,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/studio/src/components/Transcription/TranscriptionModal.tsx#L213-L249","documentation":"The TranscriptionModal's ModelSettings looks up the selected Whisper model in AVAILABLE_MODELS and throws if it cannot find a matching entry. This is an internal consistency guard: only known model names may be passed as selectedModel.","triggerScenarios":"A selectedModel value not present in AVAILABLE_MODELS is passed to ModelSettings — e.g. a persisted/hydrated stale model name after a version change, or a typo'd model identifier from custom state.","commonSituations":"localStorage/persisted Studio state holding a model removed or renamed in a newer Remotion version; custom code constructing model names; copy-pasted model identifiers.","solutions":["Reset the transcription modal state / clear persisted model selection so it falls back to a valid default","Use one of the AVAILABLE_MODELS names exactly when setting selectedModel programmatically","Update Remotion if the persisted model name is from a newer version and re-select the model"],"exampleFix":"// before\n<ModelSettings selectedModel={'whisper-large-v3-turbo-unknown'} ... />\n// after\nconst selectedModel = AVAILABLE_MODELS.some(m => m.name === storedModel) ? storedModel : 'medium';\n<ModelSettings selectedModel={selectedModel} ... />","handlingStrategy":"validation","validationCode":"const isValidModel = (name: string): boolean =>\n  AVAILABLE_MODELS.some(m => m.name === name);","typeGuard":"const isKnownWhisperModel = (name: string): name is WhisperModelName =>\n  AVAILABLE_MODELS.some(m => m.name === name);","tryCatchPattern":"try {\n  renderTranscriptionModal({selectedModel});\n} catch (e) {\n  if (String((e as Error).message).startsWith('Unknown Whisper model')) {\n    // reset model selection to default\n  } else { throw e; }\n}","preventionTips":["Always derive model names from AVAILABLE_MODELS, not hardcoded strings","Clear or migrate persisted Studio state referencing removed models","Type model selections using the AVAILABLE_MODELS union type"],"tags":["whisper","transcription","validation","studio"],"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-14T00:17:10.932Z"}