Skip to content

[Bug] Installed MLX models are missing from /v1/models and cannot be loaded by API model auto-switch #8748

Closed

Description

@Ray-vanSamsa

Environment

Where are you using Unsloth?

  • Studio desktop application
  • Studio web UI (unsloth studio)
  • Unsloth CLI
  • Python package or notebook
  • Colab or Kaggle

Operating system and version:

macOS 26.6.1 (25G76)

GPU model(s) and accelerator backend:

Apple M5 Pro (20-core GPU), Apple MLX, 64 GB unified memory

Versions:

  • Unsloth: v0.1.701-beta
  • Package: 2026.8.15
  • Desktop: 0.1.701-beta
  • llama.cpp: b10360-mix-87da1a2
  • The authenticated OpenAPI document reports backend version 2026.8.15.

What happened?

An MLX model downloaded through Unsloth Desktop is visible in the Desktop model library and can be loaded and used manually. While it is installed but not currently loaded, however, the OpenAI-compatible API does not advertise it in GET /v1/models, and an API request naming that exact model cannot trigger model auto-switch/JIT loading.

The same model appears in GET /v1/models and serves API requests successfully immediately after it is loaded manually in Unsloth Desktop.

Steps to reproduce:

  1. In Unsloth Desktop on Apple Silicon, download unsloth/Qwen3.6-35B-A3B-UD-MLX-4bit.

  2. Make sure the model is installed and visible in the Desktop model library, but is not currently loaded.

  3. Enable Settings → API → Switch model by request. In this setup, the same setting successfully switches between installed GGUF models on request.

  4. Request the authenticated OpenAI-compatible model catalog:

    curl http://127.0.0.1:8888/v1/models \
      -H "Authorization: Bearer <API_KEY>"
  5. Observe that the installed MLX model is absent, while installed GGUF models are listed.

  6. Send a chat-completions request using the exact installed MLX model ID:

    curl http://127.0.0.1:8888/v1/chat/completions \
      -H "Authorization: Bearer <API_KEY>" \
      -H "Content-Type: application/json" \
      -d '{
        "model": "unsloth/Qwen3.6-35B-A3B-UD-MLX-4bit",
        "messages": [{"role": "user", "content": "Reply only with: MLX_API_OK"}],
        "max_tokens": 32,
        "stream": false
      }'
  7. Observe HTTP 404 with model_not_found. The response says that the model is not downloaded on this server and lists only the available GGUF models.

  8. Load unsloth/Qwen3.6-35B-A3B-UD-MLX-4bit manually in Unsloth Desktop.

  9. Repeat steps 4 and 6.

  10. Observe that the MLX model now appears in GET /v1/models, and the chat-completions request succeeds with MLX_API_OK.

Expected behavior:

An installed MLX model that the Studio inference backend can serve should be discoverable through GET /v1/models and loadable on demand when its exact ID is requested, in the same way that installed GGUF models are discoverable and switchable. Clients should not have to load the MLX model manually in the Desktop UI before using it through the API.

Actual behavior:

  • Installed but unloaded MLX model: absent from GET /v1/models.
  • Direct API request with its exact model ID: HTTP 404 model_not_found, reported as not downloaded.
  • The same model after manual loading: present in GET /v1/models and usable through /v1/chat/completions.
  • Installed GGUF models remain present in GET /v1/models while unloaded and are loaded successfully through API model auto-switch in the same setup.

Model and operation involved:

  • Model: unsloth/Qwen3.6-35B-A3B-UD-MLX-4bit
  • Format/backend: MLX on Apple Silicon
  • Operations: GET /v1/models, POST /v1/chat/completions, API model auto-switch/JIT loading

Diagnostics and logs

Sanitized response before manually loading the MLX model:

HTTP 404
code: model_not_found
message: The model 'unsloth/Qwen3.6-35B-A3B-UD-MLX-4bit' is not downloaded on this server.

The response's available-model list contained the installed GGUF models but not the installed MLX model.

After manually loading the model:

GET /v1/models:
unsloth/Qwen3.6-35B-A3B-UD-MLX-4bit

POST /v1/chat/completions:
HTTP 200
MLX_API_OK

No API keys, private paths, prompts, chats, datasets, or internal network addresses are included.

Additional context

This is distinct from #7703, which requests /v1/completions and logprobs support for non-GGUF models that are already loaded. This report concerns discovery and on-demand loading of an installed MLX model before it is loaded.

Relevant prior work includes #6519, which changed /v1/models to list the full local model catalog, and #6392 / #6430, which added API model auto-switch and model discovery for downloaded GGUF models.

Apparent cause

Inspection of the current Studio backend suggests that this is not only a stale catalog response:

  • /v1/models first adds the currently loaded model, regardless of backend.
  • For additional installed but unloaded models, the catalog then filters discovery through the local GGUF resolver (local_gguf_quants).
  • The API model auto-switch resolver is likewise implemented for locally available GGUF models.

That explains the complete observed sequence: an unloaded MLX model is neither advertised nor resolved as an on-disk API-loadable model; after the Desktop UI loads it through Studio's existing MLX inference path, the generic loaded-model branch advertises it and /v1/chat/completions can serve it.

Why this matters

The OpenAI-compatible API and model selection by request are central integration surfaces for using Unsloth Studio with external clients. Unsloth provides MLX inference on Apple Silicon and publishes MLX quantizations such as the model used in this reproduction. Those models should therefore not require a manual Desktop UI action before an API client can discover and use them.

The current asymmetry prevents headless or API-driven workflows from treating Unsloth's installed MLX models like its installed GGUF models. It also makes /v1/models an incomplete capability description: a model that Studio has downloaded and can serve is reported as unavailable until a human loads it manually.

Activity

  1. changed the title [-][Studio Bug] Installed MLX models are missing from /v1/models and cannot be loaded by API model auto-switch[/-] [+][Bug] Unsloth Desktop: installed MLX models are missing from /v1/models and cannot be loaded by API model auto-switch[/+] on Aug 13, 2026
  2. changed the title [-][Bug] Unsloth Desktop: installed MLX models are missing from /v1/models and cannot be loaded by API model auto-switch[/-] [+][Bug] Installed MLX models are missing from /v1/models and cannot be loaded by API model auto-switch[/+] on Aug 13, 2026
  3. self-assigned this
    on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions