janhq/jan · error

No MLX model files found in repository

Error message

No MLX model files found in repository

What it means

Thrown when the Hugging Face repo was fetched successfully but its `siblings` list is empty, meaning the repository contains no files at all. The MLX import flow needs at least one file (a .safetensors) to download, so it aborts.

Solutions

  1. Confirm the repository actually contains model files by opening it on huggingface.co
  2. Use a different, non-empty repo id for the MLX import
  3. Re-check the modelPath for typos that might resolve to a different (empty) repo
Defensive patterns

Strategy: validation

Validate before calling

if (Array.isArray(repoInfo?.siblings) && repoInfo.siblings.length === 0) {
  showToast('This repository is empty; pick a repo containing model files.')
  return
}

Type guard

const isNonEmptyRepo = (r: unknown): r is { siblings: unknown[] } =>
  !!r && typeof r === 'object' && Array.isArray((r as any).siblings) && (r as any).siblings.length > 0

Try / catch

try {
  await startMlxImport(modelPath)
} catch (e) {
  if (e.message === 'No MLX model files found in repository') {
    showToast('Repository has no files. Choose a repo with model weights.')
  }
}

Prevention

When it happens

Trigger: fetchHuggingFaceRepo returns a repo object whose siblings array has length 0 — typically an empty repository, or an API response where file listings were filtered out.

Common situations: Pointing the import at an empty placeholder repo on Hugging Face, or a repo where the API listing returned no entries due to a malformed/edge-case repo state.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of janhq/jan@7205d770c1 (2026-09-17). Data as JSON: /api/errors/5828be3688532a73. Report an issue: GitHub.

Appendix: 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 7205d770c1)