From 885d65a2bbcde0e8e5094ae4589647875ee5838d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 17 Oct 2026 10:50:09 +0200 Subject: assistant: pick the preferred model, loaded on demand The daemon answers with whichever model llama-server has loaded and never asks for one, so it never evicts a model another client is using. The Assistant settings page now lists the router's models with their state. Load saves one as the preferred model, in Prefs, and asks the router to load it now, polling /v1/models until it reports loaded; Prefer marks the loaded model as preferred without swapping. The swap happens only on that click, so the daemon's rule holds. AGENTS.md records the router's load endpoint and its two refusals, both measured: it lives on the server root, not under /v1. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index 047adf7..79b8916 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -354,6 +354,12 @@ changing that component. The ones that generalise: GPU. Pass `autoload=false`, which answers 400 `model is not loaded` instead. Checking `/models` for `loaded` first is not enough on its own, because the model can unload between the two requests. +- **llama-server's router loads a model with `POST /models/load`** and a + `{"model": ""}` body, on the server root, not under `/v1`. Asking for + the loaded model answers 400 `model is already running`, and an unknown + id 404; both measured. With `--models-max 1` a load swaps out the + resident model for every client, so the assistant page does it only on a + click. - **`busctl get-property` escapes non-ASCII as octal.** A name with an accented letter reads `s "Do\303\250r"`-style, which no shell builtin decodes. `busctl --json=short` returns real UTF-8; `userctl` pipes it -- cgit v1.2.3