Binding without SO_REUSEADDR fails while connections to a just-stopped
server linger in TIME_WAIT, so setup moved to the next port even though
nothing was listening. Servers bind with SO_REUSEADDR, so check the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
The old hint pointed at `hf`, which lived in the venv uninstall had just
deleted. Uninstall now lists llm-host's catalog models in the cache with
their sizes and asks (default no); --models deletes without asking. It
runs `uv tool run --from huggingface_hub hf cache rm`, which also frees
blobs in the shared hub/blobs directory, and prints that exact command
when models are kept. Models outside the catalog are never touched.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
After confirming, setup stops the old services and waits up to 30s for
their ports to free, with no output. Show a spinner with elapsed seconds
immediately (a plain line when not on a terminal), ending in a check mark.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
Appends an export to the profile for the user's shell (zsh: .zshrc,
bash: .bash_profile on macOS / .bashrc on Linux, fish: config.fish),
once, and tells the user to open a new terminal at the end of setup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
After setup, if opencode is missing, offer to install it with its
official installer; then add an `llmhost` provider pointing at
http://localhost:<api port>/v1 that reads llm-host's key file directly.
Other providers and the default model are kept, the original config is
backed up once, trailing commas are tolerated, and a config with
comments is left untouched (the block is printed instead). Re-runs and
`llmhost update` keep the provider's port and models in sync.
New: `llmhost opencode-setup`, and setup flags --opencode / --no-opencode.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
`llmhost update` stopped the services and checked the ports before the
old processes had released them (launchctl bootout returns early), so
the API hopped to the next free port and broke configured clients.
Setup now waits for our own ports to close, and treats saved ports as
pinned: if another program holds one it errors instead of moving. Only
a first install auto-picks a free port.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
On a Mac with port 8000 already taken, the proxy failed to bind after
mlx_lm.server had started, leaving an orphan each time launchd retried.
- setup now stops our own services, then moves the API/dashboard to the
next free ports (or errors if a port was given explicitly)
- the MLX service binds its port before starting mlx_lm.server, always
stops the child on exit, and cleans up leftovers from earlier crashes
- drop the nonexistent huggingface_hub[cli] extra
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
nvcc resolves its toolkit from its real path, so a symlink made it look
for lib64 inside a single pip wheel and fail to link cudart_static.
Also make `llmhost start` start the dashboard after `setup --no-start`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca
Detects the GPU (NVIDIA on Linux, Apple Silicon on macOS), picks the
catalog models and builds that fit, installs vLLM or MLX without sudo,
and runs the model server plus a web dashboard as user services.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QaE1hpvyZTJixEbUUMj9Ca