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

  1. Reset the transcription modal state / clear persisted model selection so it falls back to a valid default
  2. Use one of the AVAILABLE_MODELS names exactly when setting selectedModel programmatically
  3. 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

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


AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09). Data as JSON: /api/errors/a18bef6d3c257658. Report an issue: GitHub.