llm-host/llmhost
Neil Bantoc 504ea3018a opencode: name providers LLMHost (Local) / LLMHost (<host>), identify by key file
The local and remote setup paths already used distinct provider ids, so one
opencode config can point at a local server and any number of remote ones.
Name them after the machine they reach so they're tellable apart in /models.

Decide which block is *this* machine's by the key-file reference it carries
rather than by its name, so:

  - a provider renamed by hand is still recognised and updated in place
    instead of a second one being added next to it;
  - a remote provider sitting under the `llmhost` id is no longer silently
    overwritten with a localhost baseURL (setup takes `llmhost-local` and
    says so) -- the one-shot .before-llmhost backup could not recover it;
  - uninstall removes only the local provider, never `llmhost-*` blocks for
    servers that are still running, and never providers it didn't create.

Add `llmhost opencode-remove` for the case the servers can't handle for each
other: uninstalling on a server can't reach the clients pointing at it. Wire
uninstall to it, repointing opencode's default model at a surviving llm-host
provider and dropping `model` only when none is left.

Also split config read/write out of configure() and report `unparsable`: a
syntactically broken opencode.json used to raise ValueError mid-setup.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-11-02 23:42:18 -08:00
..
backends MLX: count prompt tokens while prefill runs, not when the request ends 2026-11-02 13:50:10 -08:00
web Dashboard: time to first token tile and chart 2026-11-02 08:12:07 -08:00
__init__.py Initial llm-host: hardware-aware local LLM server with dashboard 2026-11-02 03:51:06 -08:00
__main__.py Initial llm-host: hardware-aware local LLM server with dashboard 2026-11-02 03:51:06 -08:00
catalog.json Add Ornith 1.5 9B for 16 GB Macs and 16 GB GPUs 2026-11-02 05:32:35 -08:00
cli.py opencode: name providers LLMHost (Local) / LLMHost (<host>), identify by key file 2026-11-02 23:42:18 -08:00
hfcache.py MLX: cap KV caches and recover from crashes; add llmhost watch 2026-11-02 07:45:12 -08:00
hw.py Initial llm-host: hardware-aware local LLM server with dashboard 2026-11-02 03:51:06 -08:00
opencode.py opencode: name providers LLMHost (Local) / LLMHost (<host>), identify by key file 2026-11-02 23:42:18 -08:00
paths.py Initial llm-host: hardware-aware local LLM server with dashboard 2026-11-02 03:51:06 -08:00
plan.py MLX: cap KV caches and recover from crashes; add llmhost watch 2026-11-02 07:45:12 -08:00
service.py Initial llm-host: hardware-aware local LLM server with dashboard 2026-11-02 03:51:06 -08:00