janhq/jan · error · Error
MLX engine not found
Error message
MLX engine not found
What it means
Thrown in the local MLX import dialog when `ExtensionManager.getInstance().getEngine('mlx')` returns null before calling `engine.import(modelName, { modelPath })`. Same root cause as error 124 but in the manual import path (importing a model already on disk) rather than the hub download path.
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 fad3f12a14)
Solutions
- Run on Apple Silicon macOS with the MLX extension enabled.
- Re-enable/reinstall the MLX extension and restart.
- Hide or disable the Import MLX menu entry when `getEngine('mlx')` is null.
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) {
throw new Error(
'MLX engine not found. Enable the MLX extension (Apple Silicon required) and retry.'
)
} Defensive patterns
Strategy: type-guard
Validate before calling
const engine = ExtensionManager.getInstance().getEngine('mlx')
if (!engine) {
toast.error('MLX unavailable', { description: 'Enable the MLX extension (Apple Silicon) and retry.' })
return
} Type guard
function isMlxImportEngine(e: unknown): e is { import(name: string, opts: { modelPath: string }): Promise<void> } {
return !!e && typeof (e as any).import === 'function'
} Try / catch
try {
const engine = ExtensionManager.getInstance().getEngine('mlx')
if (!isMlxImportEngine(engine)) {
toast.error('MLX engine not found', { description: 'Apple Silicon + MLX extension required.' })
return
}
await engine.import(modelName, { modelPath: selectedPath })
} catch (error) {
toast.error('Failed to import model', { description: error instanceof Error ? error.message : String(error) })
} Prevention
- Hide the Import MLX dialog trigger when the engine is absent.
- Gate to Apple Silicon at the route/menu level.
When it happens
Trigger: User opens Import MLX Model dialog, enters a name and picks a local path, clicks Import, but the MLX extension/engine is not registered. Non-Apple-Silicon platform, disabled extension, or engine key mismatch.
Common situations: Running on Linux/Windows where MLX is unavailable; MLX extension disabled after a crash; the dialog is reachable even though the engine is missing (no upstream guard).
Related errors
- MLX engine not found
- Invalid modelId: ${modelId}. Only alphanumeric and / _ - . c
- Model ${modelId} already exists
- Folder not found: ${sourcePath}
- Invalid modelId: ${modelId}. Only alphanumeric and / _ - . c
AI-assisted analysis of janhq/jan@fad3f12a14 (2026-08-12).
Data as JSON: /api/errors/4278b4ad48c9d574.
Report an issue: GitHub.