Skip to content

Core feature batch: plugin API, vision models, safe runtime updates, LAN keys, chat, tuning, model library - #88

Merged
offbyonebit merged 10 commits into
mainfrom
claude/clever-dirac-ptjvjc
Oct 11, 2026
Merged

offbyonebit merged 10 commits into
mainfrom
claude/clever-dirac-ptjvjc

Conversation

@offbyonebit

Copy link
Copy Markdown
Owner

This adds post-0.9.1 core features, one commit per area, so it can be reviewed or cherry-picked a piece at a time. This is 1.1 material; it should not land during the 1.0 soak.

What's in it

Plugin platform (db5c858)

  • New arc_llama.plugin_api (v1.0) gives plugins a public surface: require_admin, gpu_lease(), models(), gpus(), base_url, and subscribe() for model_loaded / model_stopped / model_load_failed.
  • Plugins can declare requires_api. Incompatible plugins show as incompatible instead of failing at runtime.
  • Plugin pages: same-origin /plugins/... links on the dashboard card.
  • arc-llama plugin new NAME scaffolds a working package with a test. arc-llama plugin list shows status.
  • Plugin health appears in doctor and the support bundle.

Model types (29dcf48)

  • Projectors (mmproj) pair automatically from the model's folder, using a family-name match. A generic mmproj-F16 pairs only when the folder has a single model family. Pairing works on scan, add, and HF download.
  • Models with a projector launch with --mmproj, and the projector counts toward the VRAM fit. Image requests to text-only models get a 400 before anything loads.
  • Split GGUFs register as one model, with size and fit calculated across all shards. HF downloads fetch every shard, and a missing shard fails with shard_missing.
  • /v1/rerank serves models that have reranking = true.
  • /v1/models metadata now includes capabilities and ctx.

Runtime updates (79c5422)

  • arc-llama runtime update installs the new build beside the current one. It checks the build's --help against the flags your recipes use, then runs a canary: it launches your smallest model on a scratch port and asks for a reply. It only switches if both pass.
  • arc-llama runtime rollback restores the previous binary and backend.

Serving (4b56801)

  • API keys are stored hashed in <state_dir>/api-keys.json and managed with arc-llama keys or /admin/api-keys. Once a key exists, remote callers of /v1 and /api need it. Loopback callers never do.
  • serve --lan asks for confirmation and creates a key if none exists.
  • On a remote browser, the chat page asks for the key once.
  • Behavior change: llama-server backends now always bind to 127.0.0.1. Before this, --host 0.0.0.0 exposed every raw backend port to the network with no auth.

Chat (d6d6014)

  • Stop keeps the partial answer.
  • Regenerate and Edit on the latest turn.
  • The context estimate updates while you type.
  • Per-model presets (system prompt and temperature).
  • Image attachments for vision models.

Tuning and hardware (a366fe1, 3ca1c4c)

  • benchmark --depths measures decode speed at real prefill depths (Benchmark generation speed at realistic context depths #80).
  • The tune fingerprint now includes the kernel, compute runtime, Level Zero, IGC, Mesa, and oneAPI versions, so a driver update triggers a retune (Invalidate tuned recipes after driver or oneAPI changes #85).
  • speculative --auto benchmarks every fitting draft plus n-gram and keeps the fastest.
  • Experimental tensor split across GPUs with tensor_split + split_gpus.
  • Hourly performance history is persisted, served at /admin/metrics/history, and shown as a sparkline on the dashboard.

Model library (10c3f3c)

  • Dashboard search of HF GGUF repos, with a quant list and fits / tight / too-big badges.
  • Background download with automatic registration.
  • Disk usage panel with delete. Deletes only touch files inside models_dir that no other model shares.

Partly covers #81, #83, #84, #80, #85, and #2 (the code path only; it hasn't been run on 2+ cards).

Testing

  • ruff check src tests registry-repo/scripts and mypy --check-untyped-defs src are clean.
  • pytest tests/: 1243 passed, 1 skipped (same skip as main).
  • Browser suite: 17/17. Seven new tests were added, and I confirmed the chat tests fail against the old chat.js.
  • Bare wheel installed with no extras on Python 3.13. All new CLI --help commands run.
  • The runtime canary is tested end to end against a stand-in llama-server script (POSIX only; skipped on Windows).

Not tested on real hardware: vision inference, rerank, tensor split, a canary against a real llama.cpp build, and LAN access from a phone. These need an Arc box before merging.

Known caveats

  • Keys protect /v1 and /api only. Plugin routes still handle their own auth, as before. A reverse proxy on the same host connects from loopback and skips the key check (documented in docs/security.md).
  • Fit badges in the library use the generic KV-per-token constant, because the GGUF header isn't downloaded yet. Registration recomputes context from the real metadata.
  • The first three commits on this branch carry the wrong author and AI trailers. They need a history rewrite plus force-push before merge, if wanted.

Generated by Claude Code

claude and others added 10 commits October 7, 2026 20:02
Plugins can now target arc_llama.plugin_api instead of private modules.
It exposes admin auth, GPU leases, model and GPU status, and model
lifecycle events. Plugins declare requires_api and incompatible ones are
reported instead of loaded. Adds plugin pages on the dashboard,
'arc-llama plugin new' and 'plugin list', and plugin health in doctor and
the support bundle.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016cZHDeCUwZMGxphYnZ62H8
Pair mmproj projectors with their models during discovery and Hugging
Face downloads, launch with --mmproj, count projector VRAM, and reject
image requests to text-only models before loading anything. Register
split GGUFs as one model, size and fit them across every shard, download
all shards, and fail fast on missing ones. Add /v1/rerank for models
with reranking enabled, advertise capabilities in /v1/models, and accept
the new recipe fields in the model edit API.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016cZHDeCUwZMGxphYnZ62H8
'arc-llama runtime update' installs a llama.cpp release beside the
current one, checks that it supports every flag the registered recipes
use, starts the smallest model on it and requests a short reply, and
only then switches paths.llama_server. Failures keep the current
runtime. 'arc-llama runtime rollback' restores the previous binary and
backend.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016cZHDeCUwZMGxphYnZ62H8
Remote callers of /v1 and /api need a key once one exists; loopback
stays open. Keys are stored hashed in the state dir, managed with
'arc-llama keys' or /admin/api-keys, and reloaded on change. 'serve
--lan' confirms exposure, creates a key if needed, and prints LAN URLs.
The chat page asks remote browsers for a key.

llama-server backends now always bind 127.0.0.1. They used to follow
server.host, which exposed every raw backend port when serving on the
network.
The send button stops a reply and keeps what arrived. The latest turn
gets Regenerate and Edit. The context meter estimates the next request
while typing, starting from the last measured prompt size, and warns
before it overflows. Per-model system prompt and temperature presets are
saved in the browser. Images can be attached for vision models and are
sent as image_url parts. /v1/models now reports each model's ctx.
- 'benchmark --depths' measures decode speed after real prefill sizes.
- The tune fingerprint now includes the kernel, compute runtime, Level
  Zero, IGC, Mesa Vulkan and oneAPI versions, so driver upgrades retune.
- 'speculative --auto' measures every fitting draft and n-gram against
  one baseline and keeps the fastest.
- tensor_split + split_gpus spread one model across several GPUs: device
  selectors list every card and the fit check uses their combined VRAM.
- Hourly generation and TTFT medians persist to the state dir, are served
  at /admin/metrics/history, and show as a trend line on the dashboard.
… use

The dashboard can search GGUF repos, list each quant (split files folded
into one) with a fits / tight / too-big badge for the enabled GPU, and
download one in the background; it registers automatically, projector
included. A disk panel lists model sizes and last use, and removes
models. Deletion only touches files inside models_dir that no other
model shares; anything else is just unregistered.
@offbyonebit
offbyonebit merged commit 35443b5 into main Oct 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants