Bug description
After updating Unsloth Studio to 2026.8.12 on Windows, every local GGUF model that previously worked now fails at chat time with:
The model 'C:\Users\<user>\...\model.gguf' is downloaded, but this server could not switch to it.
Retry shortly, or load it in Unsloth Studio.
The model itself loads successfully (the llama-server process starts and the health endpoint returns ok), but the chat endpoint /v1/chat/completions returns HTTP 503 with the message above. The same model works fine if requested via an alias or folder-style id.
Root cause
studio/backend/core/inference/openai_auto_download.py::split_model_ref() splits on the last colon to support repo:QUANT style references. On Windows, an absolute path also contains a colon (C:\...), so the function splits after the drive letter:
split_model_ref(r"C:\models\qwen.gguf")
# -> ("C", "\\models\\qwen.gguf")
The drive-letter guard only checks for forward slashes in the suffix, so a backslash-based Windows path is mis-interpreted as a repo:QUANT reference. The backend then decides the loaded model does not match the request, attempts to auto-switch, fails, and returns 503 with the "could not switch" message from routes/inference.py line ~4928.
To reproduce
- Install Unsloth Studio 2026.8.12 on Windows via
irm https://unsloth.ai/install.ps1 | iex.
- Place any valid GGUF model in a local folder (e.g.
C:\Users\<user>\.lmstudio\models\...\model.gguf).
- Start Unsloth Studio, go to the Models panel, load the local GGUF.
- Open a chat and send a message.
- The UI shows the 503 error above; the server log shows
POST /v1/chat/completions 503.
Expected behavior
A chat request that names the currently loaded model by its absolute Windows path should be recognized as the resident model and generate normally, as it did before the update.
Workaround
Requesting the model by an alias or folder-style id (e.g. FolderName/model.gguf) works around the parsing bug.
Suggested fix
In split_model_ref, treat suffixes that contain backslashes as part of a Windows path, not as a variant. The existing guard:
should also include backslashes:
if "/" in suffix or "\\" in suffix:
so that C:\models\model.gguf is returned as ("C:\\models\\model.gguf", None) instead of being split at the drive letter.
Environment
Bug description
After updating Unsloth Studio to 2026.8.12 on Windows, every local GGUF model that previously worked now fails at chat time with:
The model itself loads successfully (the llama-server process starts and the health endpoint returns
ok), but the chat endpoint/v1/chat/completionsreturns HTTP 503 with the message above. The same model works fine if requested via an alias or folder-style id.Root cause
studio/backend/core/inference/openai_auto_download.py::split_model_ref()splits on the last colon to supportrepo:QUANTstyle references. On Windows, an absolute path also contains a colon (C:\...), so the function splits after the drive letter:The drive-letter guard only checks for forward slashes in the suffix, so a backslash-based Windows path is mis-interpreted as a
repo:QUANTreference. The backend then decides the loaded model does not match the request, attempts to auto-switch, fails, and returns 503 with the "could not switch" message fromroutes/inference.pyline ~4928.To reproduce
irm https://unsloth.ai/install.ps1 | iex.C:\Users\<user>\.lmstudio\models\...\model.gguf).POST /v1/chat/completions 503.Expected behavior
A chat request that names the currently loaded model by its absolute Windows path should be recognized as the resident model and generate normally, as it did before the update.
Workaround
Requesting the model by an alias or folder-style id (e.g.
FolderName/model.gguf) works around the parsing bug.Suggested fix
In
split_model_ref, treat suffixes that contain backslashes as part of a Windows path, not as a variant. The existing guard:should also include backslashes:
so that
C:\models\model.ggufis returned as("C:\\models\\model.gguf", None)instead of being split at the drive letter.Environment