Single-port OpenAI-compatible inference gateway that owns the full lifecycle of llama-server processes. One binary, one config file, one port.
Applications talk OpenAI; Wire handles everything behind it — process supervision, model loading, slot routing, GPU awareness, live telemetry.
Requires llama-server on PATH.
curl -fsSL https://raw.githubusercontent.com/nogo/wire/main/scripts/install.sh | bashInstalls the binary to ~/.local/bin/wire and a systemd user service.
Requires mise.
mise trust
mise run build
mise run installWire reads ~/.config/wire/config.yaml (override with WIRE_CONFIG).
listen: ":9480"
monitor: true
max_models: 3
models:
"org/chat-model":
context: 8192
gpu_layers: 99
slots: 4
"org/embed-model":
context: 2048
gpu_layers: 99
pooling: mean
"org/*":
context: 4096
warmup:
- "org/chat-model"| Field | Default | Description |
|---|---|---|
listen |
:9480 |
Address to bind |
monitor |
false |
Enable live dashboard via WebSocket |
max_models |
1 |
Maximum concurrent llama-server instances |
models |
— | Glob patterns mapping model names to parameters |
warmup |
— | Models to pre-load at startup |
| Field | Default | Description |
|---|---|---|
context |
— | Context window size (-c) |
gpu_layers |
— | Layers to offload to GPU (-ngl) |
slots |
1 |
Parallel request slots (--parallel) |
pooling |
— | Pooling mode for embeddings (mean, cls, last) |
extra |
— | Additional llama-server flags |
spec_type |
— | Speculative decoding type (ngram-simple, ngram-mod) |
draft_max |
— | Max draft tokens (--draft-max) |
draft_min |
— | Min draft tokens (--draft-min) |
wire upPOST /v1/chat/completionsPOST /v1/completionsPOST /v1/embeddingsPOST /v1/rerankGET /v1/modelsGET /healthGET /monitor— live dashboard (requiresmonitor: true)GET /monitor/ws— WebSocket stream of telemetry data
All endpoints accept and return OpenAI-compatible JSON. SSE streaming is supported for completions.
Enable the real-time dashboard by setting monitor: true in config. Open http://localhost:9480/monitor in a browser.
The dashboard streams live telemetry over WebSocket:
- Per-model status (loading, healthy, draining), request counts, token throughput
- Slot assignment and context window utilization
- GPU metrics (utilization, VRAM, temperature, power) via AMD sysfs
- llama-server events (prompt eval, generation eval, model load)
curl http://localhost:9480/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "org/chat-model",
"messages": [{"role": "user", "content": "Hello"}]
}'Models load on first request if not in the warmup list. Concurrent requests for an unloaded model coalesce into a single load.
The install script sets up a user service. Manage it with:
systemctl --user start wire
systemctl --user stop wire
systemctl --user status wire
journalctl --user -u wire -fTo start on boot without a login session:
loginctl enable-linger $USER
systemctl --user enable wire# CPU
docker build -f docker/Dockerfile -t wire:cpu .
# AMD (ROCm 7.1)
docker build -f docker/Dockerfile.rocm -t wire:rocm .
# NVIDIA (CUDA)
docker build -f docker/Dockerfile.cuda -t wire:cuda .# CPU
docker run -v ~/.config/wire:/home/nonroot/.config/wire \
-p 9480:9480 wire:cpu
# AMD GPU
docker run --device /dev/kfd --device /dev/dri \
-v ~/.config/wire:/home/wire/.config/wire \
-p 9480:9480 wire:rocm
# NVIDIA GPU
docker run --gpus all \
-v ~/.config/wire:/home/wire/.config/wire \
-p 9480:9480 wire:cudamise run test # Run tests with race detector
mise run check # Full verification: vet, fmt, tidy, test, lint
mise run dev # Rebuild on source changesMIT
