janhq/jan · error
MLX engine not found
Error message
MLX engine not found
What it means
Thrown in ImportMlxModelDialog.handleImport when ExtensionManager.getInstance().getEngine('mlx') returns nothing, so the dialog cannot invoke engine.import() on the selected local model folder. Indicates the MLX engine/extension is unavailable at import time.
Solutions
- Enable/install the MLX extension under Settings > Extensions, then reopen the import dialog
- Restart the app to force engine re-registration
- Verify the platform supports MLX; otherwise use a different provider for the model
- Check devtools console logs for MLX extension load errors before the import attempt
Example fix
// before
const engine = ExtensionManager.getInstance().getEngine('mlx')
if (!engine) throw new Error('MLX engine not found')
// after
const engine = ExtensionManager.getInstance().getEngine('mlx')
if (!engine) {
setImportError('MLX engine unavailable. Install/enable the MLX extension and restart the app.')
return
} Defensive patterns
Strategy: type-guard
Validate before calling
const engine = ExtensionManager.getInstance().getEngine('mlx')
if (!engine || typeof engine.import !== 'function') {
setImportError('MLX extension unavailable. Enable it and restart the app.')
return
} Type guard
const hasMlxImport = (e: unknown): e is { import: (name: string, opts: unknown) => Promise<void> } =>
!!e && typeof (e as any).import === 'function' Try / catch
try {
await engine.import(modelName, { modelPath: selectedPath })
} catch (e) {
if (e.message === 'MLX engine not found') setImportError('Install/enable the MLX extension first.')
else setImportError(`Import failed: ${e.message}`)
} Prevention
- Check engine availability before opening the import dialog
- Prompt for extension installation when missing
- Restart the app after installing the MLX extension
- Keep the dialog disabled until engines finish registering
When it happens
Trigger: Selecting a local MLX model folder and clicking import while the 'mlx' engine is not registered — extension missing/disabled, failed initialization, or unsupported platform.
Common situations: The MLX extension was removed or never installed; the extension crashed on startup; importing a local folder before engines finish registering; running on hardware where MLX is unsupported.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- MLX engine not found
- Vector DB extension not available
- Conversational extension not available yet
- Extension does not support backend installation
- Extension does not support backend updates
AI-assisted analysis of janhq/jan@7205d770c1 (2026-09-17).
Data as JSON: /api/errors/4278b4ad48c9d574.
Report an issue: GitHub.
Appendix: source
Thrown at web-app/src/containers/dialogs/ImportMlxModelDialog.tsx:94
(model) => model.id === modelName
)
if (modelExists) {
toast.error('Model already exists', {
description: `${modelName} already imported`,
})
return
}
setImporting(true)
try {
console.log('[MLX Import] Starting import:', { modelName, selectedPath })
// Get the MLX engine and call its import method
const engine = ExtensionManager.getInstance().getEngine('mlx')
if (!engine) {
throw new Error('MLX engine not found')
}
console.log('[MLX Import] Calling engine.import()...')
await engine.import(modelName, {
modelPath: selectedPath,
})
console.log('[MLX Import] Import completed')
toast.success('Model imported successfully', {
description: `${modelName} has been imported`,
})
// Reset form and close dialog
setSelectedPath(null)
setModelName('')
setOpen(false)
onSuccess?.(modelName)
} catch (error) {View on GitHub (pinned to 7205d770c1)