remotion-dev/remotion · error
Unknown Whisper model: ${selectedModel}
Error message
Unknown Whisper model: ${selectedModel} What it means
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.
Source
Thrown at packages/studio/src/components/Transcription/TranscriptionModal.tsx:231
readonly setSelectedLanguage: (language: WhisperLanguage) => void;
readonly setSelectedModel: (model: WhisperWebGpuModel) => void;
readonly setSelectedTask: (task: WhisperWebGpuTask) => void;
readonly supportState: SupportState;
}> = ({
cachedModels,
selectedLanguage,
selectedModel,
selectedTask,
setSelectedLanguage,
setSelectedModel,
setSelectedTask,
supportState,
}) => {
const selectedModelInfo = AVAILABLE_MODELS.find(
({name}) => name === selectedModel,
);
if (!selectedModelInfo) {
throw new Error(`Unknown Whisper model: ${selectedModel}`);
}
const modelOptions = useMemo((): ComboboxValue[] => {
return AVAILABLE_MODELS.map((model): ComboboxValue => {
return {
type: 'item',
id: model.name,
value: model.name,
label: `${model.name} · ${formatBytes(model.webGpuDownloadSize)}${cachedModels.has(model.name) ? ' · Downloaded' : ''}`,
leftItem: model.name === selectedModel ? <Checkmark /> : null,
keyHint: null,
quickSwitcherLabel: null,
subMenu: null,
disabled: false,
onClick: () => setSelectedModel(model.name),
};
});
}, [cachedModels, selectedModel, setSelectedModel]);View on GitHub (pinned to b2f4e34732)
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
Example fix
// before
<ModelSettings selectedModel={'whisper-large-v3-turbo-unknown'} ... />
// after
const selectedModel = AVAILABLE_MODELS.some(m => m.name === storedModel) ? storedModel : 'medium';
<ModelSettings selectedModel={selectedModel} ... /> Defensive patterns
Strategy: validation
Validate before calling
const isValidModel = (name: string): boolean => AVAILABLE_MODELS.some(m => m.name === name);
Type guard
const isKnownWhisperModel = (name: string): name is WhisperModelName => AVAILABLE_MODELS.some(m => m.name === name);
Try / catch
try {
renderTranscriptionModal({selectedModel});
} catch (e) {
if (String((e as Error).message).startsWith('Unknown Whisper model')) {
// reset model selection to default
} else { throw e; }
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: localStorage/persisted Studio state holding a model removed or renamed in a newer Remotion version; custom code constructing model names; copy-pasted model identifiers.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Studio server port should be a number. Got ${typeof port} ($
- Studio server port should be a number between 1 and 65535. G
- Invalid whisper model ${model}. Available: ${models.join(',
- Error: Model ${model} does not exist at ${modelFolder ? mode
- The artifact filename ${artifact.filename} was emitted more
AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09).
Data as JSON: /api/errors/a18bef6d3c257658.
Report an issue: GitHub.