janhq/jan · warning · Error
No MLX model files found in repository
Error message
No MLX model files found in repository
What it means
Thrown when the HuggingFace repo resolved successfully but `repoInfo.siblings` is an empty array. The repo exists and the API call succeeded, but it contains zero files. This is the data-level counterpart to error 122 (which is the transport/null counterpart).
Source
Thrown at web-app/src/containers/MlxModelDownloadAction.tsx:128
const handleDownloadMlxModel = useCallback(async () => {
addLocalDownloadingModel(modelId)
const modelPath = `${model.developer}/${modelName}`
try {
// Fetch repository info to get all files
const repoInfo = await serviceHub
.models()
.fetchHuggingFaceRepo(modelPath, huggingfaceToken)
if (!repoInfo || !repoInfo.siblings) {
throw new Error('Failed to fetch repository files')
}
// Filter relevant model files for MLX
const modelFiles = repoInfo.siblings
if (modelFiles.length === 0) {
throw new Error('No MLX model files found in repository')
}
// Get the MLX engine and import
const engine = EngineManager.instance().get(
'mlx'
)
if (!engine) {
throw new Error('MLX engine not found')
}
// For MLX, we download the first safetensors file as the main model
// and the extension will download all related files
const mainSafetensorsFile = modelFiles.find((f) =>
f.rfilename.toLowerCase().endsWith('.safetensors')
)
if (!mainSafetensorsFile) {
throw new Error('No safetensors file found in repository')View on GitHub (pinned to fad3f12a14)
Solutions
- Open the repo on huggingface.co and confirm it has actual model files (`.safetensors`/`.gguf`).
- If the repo is genuinely empty, surface a clearer message naming the repo so the user can pick another.
- Treat siblings length 0 the same as 'not an MLX repo' and filter the hub listing upstream.
Example fix
// before
if (modelFiles.length === 0) {
throw new Error('No MLX model files found in repository')
}
// after
if (modelFiles.length === 0) {
throw new Error(`Repository ${modelPath} has no files. It may be empty or not an MLX model.`)
} Defensive patterns
Strategy: validation
Validate before calling
const repoInfo = await serviceHub.models().fetchHuggingFaceRepo(modelPath, huggingfaceToken)
if (!repoInfo?.siblings || repoInfo.siblings.length === 0) {
toast.error('Repository has no files', { description: `${modelPath} may be empty or not an MLX model.` })
return
} Type guard
function repoHasFiles(repo: unknown): repo is { siblings: { rfilename: string }[] } {
return Array.isArray((repo as any)?.siblings) && (repo as any).siblings.length > 0
} Try / catch
if (!repoHasFiles(repoInfo)) {
toast.error('No MLX model files found', {
description: `Repository ${modelPath} is empty. Pick an MLX-tagged repo.`,
})
return
} Prevention
- Filter the hub listing upstream to repos that actually contain files.
- Surface the repo name in the empty-files message so the user can choose another.
When it happens
Trigger: `fetchHuggingFaceRepo` returns `{ siblings: [] }` — a freshly created empty model repo, a repo whose files were all LFS-pointer-only and filtered, or a repo that only contains `.gitattributes`/README at the API level.
Common situations: Selecting a stub/placeholder repo from the hub; a repo where all weights live under a path the API metadata excluded; the model was deleted but the card remained; typo led to a near-empty mirror repo.
Related errors
- Failed to fetch repository files
- No safetensors file found in repository
- Invalid GGUF file(s): ${error.message || 'File format valida
- Model already loaded!
- No active MLX session found for model: ${modelId}
AI-assisted analysis of janhq/jan@fad3f12a14 (2026-08-12).
Data as JSON: /api/errors/5828be3688532a73.
Report an issue: GitHub.