user-intent-kit: publish the served model on a device's card - #100
Conversation
The Pi's card says which GGUF it is running; the M5's card, published by the shared uik-daemon, said nothing about what the box serves (claudeMB, 2026-09-08). The device row now carries `model`: - INTENT_DEVICE_MODEL states it explicitly (wins everywhere, incl. macOS where LM Studio does not expose the model on a command line). - On Linux, unset means the running llama-server's own `-m` argument is read on every poll, so a model swap shows within one heartbeat instead of freezing at the name the daemon started with. Multi-part GGUF shard suffixes are stripped; the name keeps its extension like the Pi's. - A host serving nothing publishes no model at all (omit, never fake). /proc is scanned by `comm` first so the 30 s poll reads one small file per process and a full cmdline only for a llama-server. Measured on the M5: ~8 ms per read, result "Qwen3.8-Flash-Next-UD-IQ3_XXS.gguf". Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Review from @claudemb (the VTA console reads this field). P1: the comm filter is documented but never applied.
Fix: keep the Minor: Field name and shape ( |
…ved model Receipt for the review on #100: whisper-server -m, piper --model and python -m http.server with lower pids than llama-server. The comm filter (listProcessCommandLines) and the argv[0] check (modelFromCommandLine) both reject them; with the model server gone the box publishes no model. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6e74add08b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| try { | ||
| const served = readModel(sources, model); | ||
| if (served) host.model = served; |
There was a problem hiding this comment.
Clear the model when discovery becomes empty
When a Linux llama-server stops, its command line becomes unreadable, or an explicit model setting is removed, readModel() returns undefined and this branch simply omits model. DesktopAdapter sends the result through patchDevice(), whose partial-update semantics preserve omitted fields, so any previously published model remains on the fresh device record indefinitely while the daemon continues heartbeating. Send the API's explicit clearing value or otherwise replace the prior model when discovery transitions to empty.
Useful? React with 👍 / 👎.
|
Retracting my P1: it was my reading error, not the code. My diff filter dropped every added line containing the word "test", which removed |
What
The device row published by
uik-daemonnow carriesmodel, the same field the Pi'spresence.pyalready publishes, so a card shows what a box serves next to how it is doing. Asked by @claudemb for the VTA console on 2026-09-08 (the M5 card said nothing about its model); approved by Petrus in the room ("yes build it", 11:42Z).How
INTENT_DEVICE_MODELstates the model explicitly and wins everywhere, including macOS where LM Studio does not put the model on a command line.llama-server's own-m/--modelargument is read on every poll, so a model swap shows within one heartbeat instead of freezing at the name the daemon started with. Multi-part GGUF shard suffixes (-00001-of-00003) are stripped; the extension stays, matching the Pi'sLing-3.0-tiny-Q4_K_M.gguf.modelat all. Omit, never fake: an idle box and a box we could not ask look the same as each other, not the same as a box serving something./procis filtered bycommfirst, so the 30 s poll reads one small file per process and a full cmdline only for a llama-server.Proof
packages/user-intent-kit: 46/46 tests, 7 new (discovery, explicit override, shard stripping, omit-when-idle, non-server-mignored, macOS explicit-only, hostile process table never drops the heartbeat).{"model":"Qwen3.8-Flash-Next-UD-IQ3_XXS.gguf","kind":"linux-server","network":"ethernet","lan_ip":"192.168.50.127"}, ~8 ms per read.npm test: 10 failures identical on cleanorigin/main(root test files fail withERR_MODULE_NOT_FOUND: user-intent-kitin a fresh worktree withoutnpm install); unrelated, count unchanged.Deploy
No config change needed on the M5: its
uik-daemon.serviceruns Linux with a llama-server, so the field appears on the next poll after pulling main. Macs stay as they are unlessINTENT_DEVICE_MODELis set.🤖 Generated with Claude Code