llm-host/llmhost/backends
Neil Bantoc 2c0818ca2b Refuse a request for a model that isn't loaded; show the slug in /models
The MLX proxy rewrote every request's "model" to the preloaded one, so asking
for a model the server wasn't running returned another model's output wearing
the requested name -- silently. The rewrite itself has to stay (mlx_lm would
otherwise try to load a model matching the name), so validate first: a name
that is neither the served name nor its repo id gets 404 model_not_found,
naming what is loaded and how to switch. An unstated name still means "the
loaded one", and the key is still checked before the model.

opencode's /models hid the same trap twice over. Label models
`<title> · <slug> (<where>)` so the list is searchable by the id used
everywhere else -- titles alone had dropped the slug -- and mark the loaded
one `(Local, loaded)`, refreshed by both switch paths (CLI and dashboard)
through a new opencode.sync(), which only ever refreshes a block that is
already there.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-11-03 00:38:35 -08:00
..
__init__.py Initial llm-host: hardware-aware local LLM server with dashboard 2026-11-02 03:51:06 -08:00
mlx.py Refuse a request for a model that isn't loaded; show the slug in /models 2026-11-03 00:38:35 -08:00
vllm.py Link lib -> lib64 in the merged CUDA tree for nvcc.profile 2026-11-02 03:52:56 -08:00