You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] API Query to non-Existant model results in no confirmation or error #8376
So as the title said; if I query the API Endpoint with a request for a model that the API server doesn't currently have; it will just route the request to the currently loaded model. It doesn't respond back about not having that model or anything related to that.
Here is an error from my connected grading application showing how the model cannot process images (because I mistyped the model name, and the currently loaded one couldn't process images), so it didn't go load a model that can process images, just directly routed them to the currently loaded model.
The endpoint should return an error if a model is requested that doesn't currently exist or is mistyped.
Error from PSL:
08-10-2026 17:58:31 Deciding: .\2026\Week31\Sun\4-Lulu-08-07-26-InOutBox - Copy.png
08-10-2026 17:58:31 Error processing 4-Lulu-08-07-26-InOutBox - Copy.png in deciding step: Error code: 400 - {'error': {'message': 'Image provided but current GGUF model does not support vision.', 'type': 'invalid_request_error', 'param': None, 'code': None}}
This is expected behavior. When Settings -> API -> Switch model by request is disabled, Unsloth serves the currently loaded model. Unknown model names are also accepted as aliases for compatibility with clients such as LiteLLM and OpenRouter.
With Switch model by request enabled, the model is enforced when using the exact model ID and quantization shown by GET /v1/models, such as repo:Q4_K_M. If the name is completely unknown and has no explicit quant, Studio still treats it as an alias and serves the currently loaded model.
Activity
Lyxot commentedon Aug 11, 2026
This is expected behavior. When
Settings -> API -> Switch model by requestis disabled, Unsloth serves the currently loaded model. Unknown model names are also accepted as aliases for compatibility with clients such as LiteLLM and OpenRouter.With
Switch model by requestenabled, the model is enforced when using the exact model ID and quantization shown byGET /v1/models, such asrepo:Q4_K_M. If the name is completely unknown and has no explicit quant, Studio still treats it as an alias and serves the currently loaded model.fix(studio): return 404 for mistyped GGUF model ids on /v1 API (#8389)