mirror of
https://github.com/lemonade-sdk/lemonade.git
synced 2026-11-23 08:49:28 -10:00
codex/auto-model-source
185
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7af4753ca5 |
Keep a downloaded model's registry on auto-mode re-pulls
In auto mode, a name-only pull of a built-in model re-selected the current preferred registry. After the preference flipped (e.g. ModelScope at one startup, Hugging Face at the next), a plain pull switched the model to the other registry and re-downloaded it, orphaning the complete copy. Keep the recorded registry when the model is already downloaded. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> |
||
|
|
45b20a88bd | Wait for the initial automatic registry decision | ||
|
|
f17a0add6a | Add automatic model registry selection | ||
|
|
f21b6e2ebb |
feat: add jobs for all operations besides chat completion to the job engine (#2766)
* feat: add jobs for all operations besides chat completion to the job engine * fix(jobs): cancellation, format negotiation, and output cap for media job ops Address review feedback on the new image/audio/3D job ops: - Propagate cancellation through the Router and backend HTTP request: image ops bind the request cancel flag (post/post_multipart now abortable) and streaming audio/3D sinks stop accepting data once cancelled; every op checks the cancel flag and throws JobError(499, "interrupted"). - audio_speech/audio_generations negotiate and validate response_format against the backend's supported formats so the returned MIME/response_format match. - Cap buffered base64 media output (kMaxJobMediaOutputBytes) so a large result cannot bloat jobs.json. - Tests: drop the no-op assertion, assert op round-trip, add a no-backend format-rejection test. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * fix(jobs): forward negotiated audio format and job cancellation to backends Write the negotiated response_format back into the request for the audio_speech and audio_generations job ops, so the backend encodes the format the step output's mime_type reports, including a default the job never sent. Bind the job cancel flag as the request cancel token around media job ops, and pass that token to Trellis' blocking post_multipart() call, so interrupting a model_3d_generations step aborts the in-flight request instead of waiting for it to finish. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(jobs): bound media storage and stop failed or cancelled operations * fix(jobs): enforce retained media budget and cancel speech streams * fix(jobs): count extracted context copies against the media budget * fix(jobs): count only the growth when an extract replaces a context value * fix(jobs): catch error payloads in media streams and bound extract values * fix(http): let GET honour the request cancel token and pass it through ACE-Step * fix(jobs): track media-derived extract copies per key instead of capping extracts * fix(jobs): drop a clobbered key from the media-extract tally * fix(jobs): normalize speech streaming options and image inputs, keep PCM headers * refactor(jobs): count stored media bytes and keep bookkeeping out of the API view * fix(jobs): reject non-base64 URIs, pre-check audio models, and avoid JSON round trips * docs(jobs): move the job-op guide under docs/dev and update the job-system page * test(jobs): make the media sink testable and cover its failure paths --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> |
||
|
|
82706b2892 |
fix(auto-tune): correct AMD UMA budgets and preserve CPU offload (#3988)
* fix(auto-tune): improve GPU/UMA budgets and GGUF SWA/KV sizing * fix: refactor and address review |
||
|
|
64dff4ab7d |
Run gufo from gufo-org/toolboxes images (#4159)
* Run gufo from gufo-org/toolboxes images Switch the gufo:rocm container from docker.io/kyuz0/amd-strix-halo-toolboxes to ghcr.io/gufo-org/toolboxes/gufo-runtime, pinned to the 0.34.0 release, and allow ghcr.io/gufo-org/ images. The image has no entrypoint and keeps `gufo serve llm` and its flags, so the launch command is unchanged. validate_containers.yml already resolves the new image and will move the pin along gufo-org's X.Y.Z release tags. * Give non-root container images their files and devices gufo-org's image runs as 1000:1000, where every image before it ran as root. Container descriptors can now declare that user, and rootless Podman maps the account onto it with --userns=keep-id, so files only their owner can read stay readable. Docker and rootful Podman add the group of every device node passed in rather than only render, so a /dev/kfd owned by video stays usable. |
||
|
|
b771b4fcc6 |
RAI 1.9.0 Upgrade (#4188)
* Move ryzenai-llm to ryzenai-server v1.9.0 - Pin ryzenai-llm npu to v1.9.0 - Rebuild the NPU catalog from the 42 amd/*_rai_1.9.0_npu checkpoints - Drop 12 NPU models with no RAI 1.9 build - Update the custom-model placeholder checkpoint * Drop ryzenai-1.7 hybrid models; test hybrid suite on a 1.9 NPU model * RAI 1.9: NPU-only catalog matching the 1.9.0 collection; test ryzenai on npu only * test: use a Qwen NPU model for ryzenai tool-call tests * test(ryzenai): add image/audio tests, fix tool-call failure message, shared media helpers - Extract _solid_color_png_data_uri into test/utils/media.py so omni and llm tests share one copy - Add test_013b/c/d for image input, streaming image input, and audio input (skipped when the backend lacks image_input/audio_input support) - Register Gemma-4-E2B-it-NPU as the multimodal test model for ryzenai - tool_calls assertion now prints model content on failure so the next flake explains itself Co-Authored-By: Claude <[email protected]> * chore: pin ryzenai-server v1.9.0 zip sha256 Co-Authored-By: Claude <[email protected]> * fix(ryzenai): switch tool-call test model to Llama-3.2-1B-Instruct-NPU Qwen2.5-3B 1.9 NPU checkpoint produces garbage output after the first token on STX Halo runners. Llama-3.2-1B-Instruct decodes cleanly and ryzenai-server now parses its bare-JSON tool-call format. Co-Authored-By: Claude <[email protected]> * chore: add hot label to Gemma-4-E4B-it-NPU; remove stale comment Co-Authored-By: Claude <[email protected]> * refactor: revert out-of-scope test changes from 1.9 upgrade branch Remove image/audio tests from server_llm.py — the ryzenai backend does not declare image_input/audio_input support so they never ran. Restore server_omni.py to main (PNG helper refactor was unrelated). Remove dead capabilities.py multimodal model entry. Co-Authored-By: Claude <[email protected]> * chore: update ryzenai-server v1.9.0 zip sha256 Rebuilt from 8008518 (Llama 3.2 tool-call parser). Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]> |
||
|
|
4d0568a13b |
server: return 400 for repos with no supported model files (#3673)
* server: return 400 for repos with no supported model files Log 4xx at WARNING in the catch-all error handler and keep ERROR for 5xx. * server: return 400 for invalid or oversized collection manifests * server: return 400 for a collection manifest with a non-string recipe json::value() throws a type error when recipe is not a string, which the route reported as a 500. Check the type first, in a helper so the manifest shape has unit tests. * server: keep the error handler's log levels as they were |
||
|
|
57773fe159 | Fixes the autotune falling back to 4k ctx due to memory read mismatches (#4182) | ||
|
|
2ddcca793b |
fix(ollama): pass images and audio through /api/generate and report audio (#4163)
* fix(ollama): pass images and audio through /api/generate and report the audio capability * fix(ollama): always send response as a string in /api/generate stream lines |
||
|
|
6c70c4b5bf |
fix(ollama): end failed /api/chat and /api/generate streams with an error line (#4157)
* fix(ollama): end failed /api/chat and /api/generate streams with an error line instead of an empty success * fix(streaming): record a backend error relayed mid-stream as a backend error, not a client disconnect, and cap the logged error |
||
|
|
27f3f6759b |
fix(ollama): reject models that can't chat or generate before loading them (#4155)
* fix(ollama): reject non-LLM models on /api/chat before loading and report image capability in /api/show * fix(ollama): reject non-generating models on /api/generate before loading and stop treating upscalers as image generators * test(ollama): cover the image-generator rule in a C++ unit test and clarify rejection error docs * test(ollama): cover classification models in the /api/chat and /api/generate rejection tests |
||
|
|
13ed8c91bf |
Add GGUF zero-shot routers on llama.cpp: encoder in llama-server, rule head in lemond (#4096)
* Adding support for GGUF based zero-shot models * CR feedback * pr feedback: CI fix, file path bug * pr feedback: local file edge cases incl missing ones * pr feedback * CR feedback * pr feedback * fixing local model heckpoints edge cases * misleading directory checkpoint error * pr feedback: scheme prefixed checkpoints and early label size gaurd |
||
|
|
d84d9c1b79 | test: wait for DirectoryWatcher detection instead of fixed sleeps (#4117) | ||
|
|
322675ac6d | fix(models): list every shard in model file inventory (#4108) | ||
|
|
581dff0ca1 | fix(test): Fix build for MSVC (Visual Studio 2026) (#4109) | ||
|
|
a655222457 |
feat(hrx): Enable MPT + add MTP capable model (#4014)
* Enable automatic MTP for HRX models * Add Qwen3.5 HRX model and pin MTP-capable backend * Remove heavyweight HRX MTP inference test from CI suite * Address HRX MTP catalog and contract review feedback |
||
|
|
b0e01c7bf4 |
feat(backends): Add description and author metadata to backends for display in the CLI and GUI (#4059)
* feat(backends): describe each backend's purpose, author, publisher and license Each descriptor now carries an \bout\ entry per backend: a one- or two-sentence description, the author who wrote the engine or fork, the publisher who builds the artifact Lemonade installs, the license, and a link to the project. For example, llamacpp:nathanw is authored by NathanW (Nathanw1014) and published by Donato Capitella (kyuz0). - /system-info reports the fields on every backend entry. - \lemonade backends info RECIPE:BACKEND\ prints them with the backend's tier, format and status. Backends the server's OS cannot run, which /system-info omits, are described from the CLI's own descriptors. - \lemonade backends\ ends with a tip pointing at \ackends info\. - The app's backend cards show the author (linked to the project) beside the version, the description, and the publisher and license. - BackendContractsTest fails a support row with no description, author, publisher or https project URL, and an entry naming no support row. Implements discussion #4010. Co-authored-by: Cursor <[email protected]> * fix(app): show 'License: Not declared' on backend cards when license is empty Co-authored-by: Cursor <[email protected]> * docs(backends): note that backend metadata describes upstream for binaries Lemonade did not install Co-authored-by: Cursor <[email protected]> * Address halogen comments * feat(app): show backend format (native, python, container) on backend cards Each variant on a backend card now carries a pill naming its format from the descriptor, which /system-info already reports. Hovering it explains how that format runs. Co-authored-by: Cursor <[email protected]> * Address Florian feedback Co-authored-by: Cursor <[email protected]> * Keep upstream-binary note in route schema and pass API key to CLI tests Co-authored-by: Cursor <[email protected]> * Regenerate models.js after Halogen display-name rename Co-authored-by: Cursor <[email protected]> * Apply batched suggestions from code review Co-authored-by: Jeremy Fowers <[email protected]> * Shorten project_url schema text and drop 'most' from Vulkan descriptions Co-authored-by: Cursor <[email protected]> --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: Jeremy Fowers <[email protected]> |
||
|
|
d4f53e7dd3 |
Gate NVIDIA CUDA backends on a missing or outdated driver (#4066)
* Gate NVIDIA CUDA backends on a missing or outdated driver Detection fallbacks (DRM/nouveau and lspci on Linux, PCI vendor ID via Win32_PnPEntity on Windows) now flag NVIDIA GPUs that have no NVIDIA driver bound. Backends that require an NVIDIA GPU report "unsupported" when every detected NVIDIA GPU lacks the driver. llamacpp:cuda additionally reports "action_required" with a driver download link when the driver predates its CUDA 12.9.0 toolkit (576.02 on Windows, 575.51.03 on Linux). Neither state is chosen as the auto default, so llamacpp falls through to Vulkan; an explicit cuda selection is still allowed for an old driver. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LdWSB6ZjZctJ4yMjCV6nHm * Use the CUDA 12.x driver floor for the llamacpp:cuda minimum CUDA minor-version compatibility lets the CUDA 12.9 build run on any CUDA 12.0-era driver, so gate on 528.33 (Windows) / 525.60.13 (Linux) instead of the 12.9.0 toolkit's own 576.02 / 575.51.03 minimum. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LdWSB6ZjZctJ4yMjCV6nHm * Limit NVIDIA driver gating to CUDA-only rows and keep arch results Vulkan rows for sd-cpp, acestep, trellis, openmoss and thinksound list nvidia_gpu alongside cpu/amd_gpu, so the driver gate marked them unsupported whenever an NVIDIA card had no driver, removing the very fallback the gate is meant to steer to. Only rows whose sole device is nvidia_gpu are gated now. The gate also no longer replaces an unsupported-architecture result (e.g. Pascal on llamacpp:cuda): an old driver kept such rows unsupported instead of turning them into a selectable action_required. A missing driver still names the driver when the architecture is unknown, which is how a driverless card is detected. Docs: note the limits of minor-version compatibility and recommend the 12.9 toolkit's driver. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LdWSB6ZjZctJ4yMjCV6nHm * Tell users to restart Lemonade after fixing the NVIDIA driver Hardware is detected once per server process, so a driver installed or updated while lemond runs is not seen until restart. Also say "not installed or not loaded", which covers a driver package whose kernel module failed to load. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LdWSB6ZjZctJ4yMjCV6nHm --------- Co-authored-by: Claude <[email protected]> |
||
|
|
11a3ea0ac5 |
feat(backend): FLM 1.0.11 decision models support (#4037)
* main into zero shot, post refactoring * cleanup * cleanup * CR feedback: fixed the residency document clarification bug * cr feedback: fake tests with propoer assertions * stacks on the zero shot work in 3952 * pr feedback: better policy checks and logging for backend failures * pr feedback: adding on_truncation * pr feedback: adding the truncation support for classifier and fixing documentation issues * CI fix and doc enhancement * pr feedback: fixed edge cases * added check for 0.3.7 truncated verification * pr feedback: router validation and argument handling * Added the example lfm2 ONNX model * pr feedback: added max-length and 3 flag truncate flags * pin bump to 0.4.0 and more tests for zero-shot * CI fix * pr feedback: model level filtering * PR Feedback: CR feedback * restricting decision models based on model family. 8k context limit by default for encoder decision models * checks at router level to reject wrongly labeled systemone models with 400 * systemone support through FLM 1.0.11 * added truncation FLM check * pr feedback: truncated is set to false and better error handling with input lengths * pr feedback: default set to 4k, limits passed down by llama-server, truncated is added to systemone * truncated documentation * pr feedback: checks the token count instead of the template * missing tests * CI bugs |
||
|
|
6c5a26aeb8 |
Remove image_defaults and audio_defaults (#4049)
* remove image defaults * remove audio defaults * add typed option accessors * address review comments * align documentation to changes * add user_configurable concept for recipe options * address review comment * never show hidden fields * retrigger-ci |
||
|
|
d397a6e8fa |
Add SystemOne decision models: /v1/systemone, GGUF zero-shot on /v1/classify, and the systemone router classifier (#3956)
* main into zero shot, post refactoring * cleanup * cleanup * CR feedback: fixed the residency document clarification bug * cr feedback: fake tests with propoer assertions * stacks on the zero shot work in 3952 * pr feedback: better policy checks and logging for backend failures * pr feedback: adding on_truncation * pr feedback: adding the truncation support for classifier and fixing documentation issues * CI fix and doc enhancement * pr feedback: fixed edge cases * added check for 0.3.7 truncated verification * pr feedback: router validation and argument handling * Added the example lfm2 ONNX model * pr feedback: added max-length and 3 flag truncate flags * pin bump to 0.4.0 and more tests for zero-shot * CI fix * pr feedback: model level filtering * PR Feedback: CR feedback * restricting decision models based on model family. 8k context limit by default for encoder decision models * checks at router level to reject wrongly labeled systemone models with 400 * pr feedback: default set to 4k, limits passed down by llama-server, truncated is added to systemone * truncated documentation * pr feedback: checks the token count instead of the template |
||
|
|
f5b11c6ddd |
feat(gufo): add the Gufo container backend (#4031)
* feat(backends): run container backends through ContainerManager, starting with llamacpp:nathanw Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(containers): list every missing setup step and ask for consent at install Container setup now reports what a user still has to do in one pass, in the order they do it, and the CLI finishes the install once only consent is left. - Setup checks run in two groups. Before consent: the container tool on PATH, then the video/render groups (or the Docker socket), then enable_containers. These read only PATH, groups and sockets, so no container command runs before the user opts in; Podman counts as rootful when CONTAINER_HOST is set or lemond runs as root, until podman info answers. After consent: podman info, then SELinux. - Every failed check is reported at once. /system-info gives one problem per line in message, numbered steps in action (install commands, group changes, enable_containers, and logging out last), and the failed checks' ids in setup_checks. - lemonade backends prints message and action lines side by side. - lemonade backends install, run and load check the backend's setup before installing or downloading anything. When enable_containers is the only step left, they show the existing warning, enable it on yes and finish the command; backends install --yes skips the prompt. Otherwise they print every problem and step and exit 1. - The spec, user guide, CLI and API docs follow the new order and fields. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V3HB9nm64VVxScERksHiia * fix(cli): read the selected backend only when recipe options were given lemonade run and load without a --<recipe> option have no recipe options, and reading the backend option from them aborted the CLI. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V3HB9nm64VVxScERksHiia * style(containers): trim the setup comments the comment-slop hook flagged Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V3HB9nm64VVxScERksHiia * ci(containers): gate the container smoke test like the other hosted test jobs The signing and release-branch skips exist to spare self-hosted runners; the smoke test runs on ubuntu-latest. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * ci(containers): pin the container smoke test to Ubuntu 24.04 The job installs the 24.04 .deb on the bare runner, and ubuntu-latest moves to 26.04 in November 2026, where libmbedcrypto7t64 does not exist. The comments now say why the job runs on the bare runner and needs the PPA. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): assert lemond's mode in the smoke test and log at debug test_03 now checks the published port on lemond's container, so each leg proves lemond detected the intended mode, not only that the tool runs in it. LEMONADE_CI_MODE puts llama-server's output in the uploaded logs, as in the other jobs that start lemond. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * ci: say why backends-gate also lists jobs that run on every PR Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): cut the container spec changes back to what the implementation made false Keeps the opt-in invariants (off by default, install and load refused while off, no container command before opt-in), rootful Podman's connection path, the Podman answers check, and reporting every failed check at once. Drops setup_checks, action ordering, CLI prompting, and the expect_rootless detail. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): name the enable warning instead of quoting it Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(llamacpp): list nathanw as a guest backend, as its descriptor declares Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(cli): word the enable_containers prompts as enabling containers, not backends The setting enables every container, whatever its tier, so the warning no longer calls the images community-built. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * chore(backends): drop the image allowlist comment from ContainerPolicy ContainerManager::allowed_image is the allowlist; the comment restated it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * refactor(containers): leave GPU selection and the SELinux check to the first ROCm container backend llamacpp:nathanw maps only /dev/dri, so nothing here reached the HIP_VISIBLE_DEVICES lookup or the SELinux check, both gated on /dev/kfd. needs_gfx1151_cwsr_fix goes back to its own KFD read. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): drop checks that restate code, and mount single files only The directory mounts serve Halogen's tokenizer and move to that PR; here every model file llamacpp names is a GGUF. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): take the smoke test's backend as --backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): leave Podman and Docker alone while enable_containers is false With containers disabled, lemond no longer sweeps at startup, connects to the Docker socket, runs `image inspect`, or removes images on uninstall. Setting enable_containers to false unloads every model running in a container first, so none is left that a later crash would orphan. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015BUXEd42tPQH67MQPW1XZh * Update to a modern pin * refactor(containers): drop the startup sweep A killed lemond's containers already stop and remove themselves: the attached `run --rm` child gets SIGTERM from PR_SET_PDEATHSIG and proxies it into the container. Verified with Docker and rootful/rootless Podman. The smoke test now kills lemond with a model loaded and checks no container remains. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * docs(load): list nathanw among the llamacpp_backend choices Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * ci(containers): cap the Dispatch container job at 45 minutes A hung job would otherwise hold a pool machine for up to 4 hours. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * test(containers): skip the killed-lemond check under rootful Podman Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * docs(containers): link container images to their registry pages Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): skip the killed-lemond check under rootful Docker too The Docker daemon owns the container, so whether it stops after lemond is killed depends on the docker client forwarding SIGTERM in time, which is racy. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01R5SJqLuAuPwGaJQvWTwMai * refactor(containers): drop the enable_containers setting Container backends no longer need an opt-in before they install or load. The setup assistant's remaining checks still report what is missing. - Remove the config key, its validation, getter and config effect. - Remove the CLI consent prompt and pre-flight check, and the --yes flags on `config set` and `backends install` that only served it. - Always check the Docker socket, read the image on disk for installed state, and remove the image on uninstall. - Remove helpers left unused: containers_enabled, Router::get_container_model_names, WrappedServer::runs_in_container, ServerProcess::in_container. - Update the spec, guides, generated API docs, tests and CI. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019cGBZamSKYLVeygD6axiu9 * perf(containers): run container setup checks once per system-info build The checks are host-wide, so every container backend got the same report while each one ran them again, `podman info` included. Drop the unused recipe and backend parameters from container_setup_failure and compute its report at most once per pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019cGBZamSKYLVeygD6axiu9 * test(containers): fail when listing labeled containers or networks fails A failed `ps` or `network ls` printed nothing, so the checks that expect no leftovers passed without listing anything. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019cGBZamSKYLVeygD6axiu9 * feat(containers): run container backends from lemond.service with rootless Podman Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): create Podman networks without a DNS server Every model load failed under lemond.service with Podman 5 (Fedora 43/44, Ubuntu 26.04, Debian 13): netavark: error while applying dns entries: aardvark-dns failed to start: Failed to connect to user scope bus via local transport `podman network create` turns DNS on by default, and rootless netavark (1.14 and later) starts aardvark-dns with `systemd-run --scope --user`, which needs the account's systemd user manager. The lemonade system account has no login session, so it has none. Each per-model network holds one container, and lemond reaches it through its published port or inspected address, never by name, so the network needs no DNS server. Docker has no such option and is unaffected. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(lemond.service): let rootless Podman keep its runtime state in the host's /tmp Every model load failed under lemond.service on Ubuntu 26.04 and Debian 13: Error: setting up Pasta: pasta failed with exit code 1: Couldn't open PID file /run/lemonade/containers/networks/rootless-netns/rootless-netns-conn.pid: Permission denied Podman 5 sets up rootless networking with pasta, under $XDG_RUNTIME_DIR, which the unit set to /run/lemonade. The AppArmor profile Ubuntu and Debian ship for pasta allows writes only under /tmp, /run/user/<uid> and home directories under /home, so it denied the PID file. ProtectHome=yes hides /run/user, and the account has no login session to create /run/user/<uid> in any case. With XDG_RUNTIME_DIR unset, Podman uses its own fallback in /tmp (/tmp/storage-run-<uid>, or /tmp/containers-user-<uid> on Podman 4), which the profile allows and Podman's own tmpfiles.d exempts from age-based cleanup. lemond's own runtime directory stays /run/lemonade, through RuntimeDirectory=. PrivateTmp goes with it. In a private /tmp, `podman` run as lemonade from a shell finds no runtime state, and Podman 5 then refreshes the shared database: the running container drops out of lemond's view, `podman stop` reports no such container, and the engine keeps holding the GPU until the service stops. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(debian): create /var/lib/cni at install On Ubuntu 24.04, every model load under lemond.service failed until the host next rebooted: Error: unable to find network with name or ID lemonade-<...>: network not found Podman 4's rootless network namespace bind-mounts a private directory over /var/lib/cni, or, while that does not exist, over its nearest existing parent, /var/lib. That mount hid /var/lib/lemonade, the lemonade account's home, which holds its Podman storage and network configs, so `podman run` found no network that `podman network create` had just made. Podman's own tmpfiles.d creates /var/lib/cni only at boot (`D!`), so a fresh install hit this until a reboot. The package now ships the directory in tmpfiles.d, which dh_installtmpfiles applies at install. The .rpm keeps lemonade's home in /opt, and Podman 5 makes no such mount, so neither needs it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): keep DNS on rootful Podman's per-model networks Podman 4's CNI backend gives an --internal network created with --disable-dns no gateway, so the host has no route to the container and rootful lemond, which connects at the container's address, waited on llama-server until the test timed out. Only rootless Podman needs DNS off, and it reaches the container through a published port. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(ds4): move ds4:rocm to a container backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(containers): pick the ROCm container's GPU and check SELinux for /dev/kfd backends ds4:rocm is the first container backend that maps /dev/kfd. Its container gets HIP_VISIBLE_DEVICES for the GPU lemond sized it for, read from the KFD topology next to system_info's other KFD reads, and hosts with SELinux enforcing must allow containers to map GPU devices. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * ci(containers): restore the Dispatch container job's 4-hour timeout Four ds4 jobs downloading DS4's 81 GB checkpoint at once on fresh Dispatch machines each ran past 45 minutes. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(containers): run container backends from lemond.service with rootless Podman Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): create Podman networks without a DNS server Every model load failed under lemond.service with Podman 5 (Fedora 43/44, Ubuntu 26.04, Debian 13): netavark: error while applying dns entries: aardvark-dns failed to start: Failed to connect to user scope bus via local transport `podman network create` turns DNS on by default, and rootless netavark (1.14 and later) starts aardvark-dns with `systemd-run --scope --user`, which needs the account's systemd user manager. The lemonade system account has no login session, so it has none. Each per-model network holds one container, and lemond reaches it through its published port or inspected address, never by name, so the network needs no DNS server. Docker has no such option and is unaffected. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(lemond.service): let rootless Podman keep its runtime state in the host's /tmp Every model load failed under lemond.service on Ubuntu 26.04 and Debian 13: Error: setting up Pasta: pasta failed with exit code 1: Couldn't open PID file /run/lemonade/containers/networks/rootless-netns/rootless-netns-conn.pid: Permission denied Podman 5 sets up rootless networking with pasta, under $XDG_RUNTIME_DIR, which the unit set to /run/lemonade. The AppArmor profile Ubuntu and Debian ship for pasta allows writes only under /tmp, /run/user/<uid> and home directories under /home, so it denied the PID file. ProtectHome=yes hides /run/user, and the account has no login session to create /run/user/<uid> in any case. With XDG_RUNTIME_DIR unset, Podman uses its own fallback in /tmp (/tmp/storage-run-<uid>, or /tmp/containers-user-<uid> on Podman 4), which the profile allows and Podman's own tmpfiles.d exempts from age-based cleanup. lemond's own runtime directory stays /run/lemonade, through RuntimeDirectory=. PrivateTmp goes with it. In a private /tmp, `podman` run as lemonade from a shell finds no runtime state, and Podman 5 then refreshes the shared database: the running container drops out of lemond's view, `podman stop` reports no such container, and the engine keeps holding the GPU until the service stops. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(halogen): add the Halogen Flash container backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(debian): create /var/lib/cni at install On Ubuntu 24.04, every model load under lemond.service failed until the host next rebooted: Error: unable to find network with name or ID lemonade-<...>: network not found Podman 4's rootless network namespace bind-mounts a private directory over /var/lib/cni, or, while that does not exist, over its nearest existing parent, /var/lib. That mount hid /var/lib/lemonade, the lemonade account's home, which holds its Podman storage and network configs, so `podman run` found no network that `podman network create` had just made. Podman's own tmpfiles.d creates /var/lib/cni only at boot (`D!`), so a fresh install hit this until a reboot. The package now ships the directory in tmpfiles.d, which dh_installtmpfiles applies at install. The .rpm keeps lemonade's home in /opt, and Podman 5 makes no such mount, so neither needs it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(ds4): move ds4:rocm to a container backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(halogen): read the gfx1151 KFD node through system_info and report the setup steps Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(rocmfpx): add the ROCm FPX container backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): keep DNS on rootful Podman's per-model networks Podman 4's CNI backend gives an --internal network created with --disable-dns no gateway, so the host has no route to the container and rootful lemond, which connects at the container's address, waited on llama-server until the test timed out. Only rootless Podman needs DNS off, and it reaches the container through a published port. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(containers): pick the ROCm container's GPU and check SELinux for /dev/kfd backends ds4:rocm is the first container backend that maps /dev/kfd. Its container gets HIP_VISIBLE_DEVICES for the GPU lemond sized it for, read from the KFD topology next to system_info's other KFD reads, and hosts with SELinux enforcing must allow containers to map GPU devices. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(containers): mount a model directory one file at a time, for Halogen's tokenizer Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * ci: keep container backend images on the newest build of their tags Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(api): regenerate for the rocmfpx section Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * fix(app): show container setup steps in a collapsible section The Setup guide button passed `action` to window.open, but lemond's `action` holds a command, steps, or a link. A non-link action now shows as a "Setup required" disclosure with the failure message and steps, regardless of the technical-details toggle; links keep the button. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(containers): check GPU device access instead of video/render membership Desktop distros such as Ubuntu and Arch grant the logged-in account /dev/kfd and /dev/dri access through ACLs, so an account outside video and render could use the GPU yet was told to fix its groups. The setup check now tests read/write access to /dev/kfd and each render node. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(containers): ask Podman its mode before the host check container_setup_failure() ran check_host() before check_podman(), so the first pass after startup guessed rootless and could report a GPU access failure on rootful Podman that the next pass cleared. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(containers): check Docker with docker info instead of a fixed socket The socket probe only looked at /var/run/docker.sock, so DOCKER_HOST, Docker contexts and Docker Desktop's socket read as a refused account. docker info follows the CLI's own connection, and its answer also identifies Docker Desktop and rootless Docker, which cannot run container backends, so those now get Podman as the fix step. The spec's device-node rows now describe the access check instead of group membership. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(lemond.service): keep PrivateTmp and give Podman's private /tmp state to tmpfiles.d |
||
|
|
204f00df74 |
feat(halogen): add the Halogen Flash container backend (#3712)
* feat(backends): run container backends through ContainerManager, starting with llamacpp:nathanw Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(containers): list every missing setup step and ask for consent at install Container setup now reports what a user still has to do in one pass, in the order they do it, and the CLI finishes the install once only consent is left. - Setup checks run in two groups. Before consent: the container tool on PATH, then the video/render groups (or the Docker socket), then enable_containers. These read only PATH, groups and sockets, so no container command runs before the user opts in; Podman counts as rootful when CONTAINER_HOST is set or lemond runs as root, until podman info answers. After consent: podman info, then SELinux. - Every failed check is reported at once. /system-info gives one problem per line in message, numbered steps in action (install commands, group changes, enable_containers, and logging out last), and the failed checks' ids in setup_checks. - lemonade backends prints message and action lines side by side. - lemonade backends install, run and load check the backend's setup before installing or downloading anything. When enable_containers is the only step left, they show the existing warning, enable it on yes and finish the command; backends install --yes skips the prompt. Otherwise they print every problem and step and exit 1. - The spec, user guide, CLI and API docs follow the new order and fields. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V3HB9nm64VVxScERksHiia * fix(cli): read the selected backend only when recipe options were given lemonade run and load without a --<recipe> option have no recipe options, and reading the backend option from them aborted the CLI. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V3HB9nm64VVxScERksHiia * style(containers): trim the setup comments the comment-slop hook flagged Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V3HB9nm64VVxScERksHiia * ci(containers): gate the container smoke test like the other hosted test jobs The signing and release-branch skips exist to spare self-hosted runners; the smoke test runs on ubuntu-latest. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * ci(containers): pin the container smoke test to Ubuntu 24.04 The job installs the 24.04 .deb on the bare runner, and ubuntu-latest moves to 26.04 in November 2026, where libmbedcrypto7t64 does not exist. The comments now say why the job runs on the bare runner and needs the PPA. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): assert lemond's mode in the smoke test and log at debug test_03 now checks the published port on lemond's container, so each leg proves lemond detected the intended mode, not only that the tool runs in it. LEMONADE_CI_MODE puts llama-server's output in the uploaded logs, as in the other jobs that start lemond. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * ci: say why backends-gate also lists jobs that run on every PR Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): cut the container spec changes back to what the implementation made false Keeps the opt-in invariants (off by default, install and load refused while off, no container command before opt-in), rootful Podman's connection path, the Podman answers check, and reporting every failed check at once. Drops setup_checks, action ordering, CLI prompting, and the expect_rootless detail. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): name the enable warning instead of quoting it Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(llamacpp): list nathanw as a guest backend, as its descriptor declares Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(cli): word the enable_containers prompts as enabling containers, not backends The setting enables every container, whatever its tier, so the warning no longer calls the images community-built. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * chore(backends): drop the image allowlist comment from ContainerPolicy ContainerManager::allowed_image is the allowlist; the comment restated it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * refactor(containers): leave GPU selection and the SELinux check to the first ROCm container backend llamacpp:nathanw maps only /dev/dri, so nothing here reached the HIP_VISIBLE_DEVICES lookup or the SELinux check, both gated on /dev/kfd. needs_gfx1151_cwsr_fix goes back to its own KFD read. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): drop checks that restate code, and mount single files only The directory mounts serve Halogen's tokenizer and move to that PR; here every model file llamacpp names is a GGUF. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): take the smoke test's backend as --backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): leave Podman and Docker alone while enable_containers is false With containers disabled, lemond no longer sweeps at startup, connects to the Docker socket, runs `image inspect`, or removes images on uninstall. Setting enable_containers to false unloads every model running in a container first, so none is left that a later crash would orphan. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015BUXEd42tPQH67MQPW1XZh * Update to a modern pin * refactor(containers): drop the startup sweep A killed lemond's containers already stop and remove themselves: the attached `run --rm` child gets SIGTERM from PR_SET_PDEATHSIG and proxies it into the container. Verified with Docker and rootful/rootless Podman. The smoke test now kills lemond with a model loaded and checks no container remains. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * docs(load): list nathanw among the llamacpp_backend choices Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * ci(containers): cap the Dispatch container job at 45 minutes A hung job would otherwise hold a pool machine for up to 4 hours. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * test(containers): skip the killed-lemond check under rootful Podman Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * docs(containers): link container images to their registry pages Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): skip the killed-lemond check under rootful Docker too The Docker daemon owns the container, so whether it stops after lemond is killed depends on the docker client forwarding SIGTERM in time, which is racy. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01R5SJqLuAuPwGaJQvWTwMai * refactor(containers): drop the enable_containers setting Container backends no longer need an opt-in before they install or load. The setup assistant's remaining checks still report what is missing. - Remove the config key, its validation, getter and config effect. - Remove the CLI consent prompt and pre-flight check, and the --yes flags on `config set` and `backends install` that only served it. - Always check the Docker socket, read the image on disk for installed state, and remove the image on uninstall. - Remove helpers left unused: containers_enabled, Router::get_container_model_names, WrappedServer::runs_in_container, ServerProcess::in_container. - Update the spec, guides, generated API docs, tests and CI. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019cGBZamSKYLVeygD6axiu9 * perf(containers): run container setup checks once per system-info build The checks are host-wide, so every container backend got the same report while each one ran them again, `podman info` included. Drop the unused recipe and backend parameters from container_setup_failure and compute its report at most once per pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019cGBZamSKYLVeygD6axiu9 * test(containers): fail when listing labeled containers or networks fails A failed `ps` or `network ls` printed nothing, so the checks that expect no leftovers passed without listing anything. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019cGBZamSKYLVeygD6axiu9 * feat(containers): run container backends from lemond.service with rootless Podman Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): create Podman networks without a DNS server Every model load failed under lemond.service with Podman 5 (Fedora 43/44, Ubuntu 26.04, Debian 13): netavark: error while applying dns entries: aardvark-dns failed to start: Failed to connect to user scope bus via local transport `podman network create` turns DNS on by default, and rootless netavark (1.14 and later) starts aardvark-dns with `systemd-run --scope --user`, which needs the account's systemd user manager. The lemonade system account has no login session, so it has none. Each per-model network holds one container, and lemond reaches it through its published port or inspected address, never by name, so the network needs no DNS server. Docker has no such option and is unaffected. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(lemond.service): let rootless Podman keep its runtime state in the host's /tmp Every model load failed under lemond.service on Ubuntu 26.04 and Debian 13: Error: setting up Pasta: pasta failed with exit code 1: Couldn't open PID file /run/lemonade/containers/networks/rootless-netns/rootless-netns-conn.pid: Permission denied Podman 5 sets up rootless networking with pasta, under $XDG_RUNTIME_DIR, which the unit set to /run/lemonade. The AppArmor profile Ubuntu and Debian ship for pasta allows writes only under /tmp, /run/user/<uid> and home directories under /home, so it denied the PID file. ProtectHome=yes hides /run/user, and the account has no login session to create /run/user/<uid> in any case. With XDG_RUNTIME_DIR unset, Podman uses its own fallback in /tmp (/tmp/storage-run-<uid>, or /tmp/containers-user-<uid> on Podman 4), which the profile allows and Podman's own tmpfiles.d exempts from age-based cleanup. lemond's own runtime directory stays /run/lemonade, through RuntimeDirectory=. PrivateTmp goes with it. In a private /tmp, `podman` run as lemonade from a shell finds no runtime state, and Podman 5 then refreshes the shared database: the running container drops out of lemond's view, `podman stop` reports no such container, and the engine keeps holding the GPU until the service stops. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(debian): create /var/lib/cni at install On Ubuntu 24.04, every model load under lemond.service failed until the host next rebooted: Error: unable to find network with name or ID lemonade-<...>: network not found Podman 4's rootless network namespace bind-mounts a private directory over /var/lib/cni, or, while that does not exist, over its nearest existing parent, /var/lib. That mount hid /var/lib/lemonade, the lemonade account's home, which holds its Podman storage and network configs, so `podman run` found no network that `podman network create` had just made. Podman's own tmpfiles.d creates /var/lib/cni only at boot (`D!`), so a fresh install hit this until a reboot. The package now ships the directory in tmpfiles.d, which dh_installtmpfiles applies at install. The .rpm keeps lemonade's home in /opt, and Podman 5 makes no such mount, so neither needs it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): keep DNS on rootful Podman's per-model networks Podman 4's CNI backend gives an --internal network created with --disable-dns no gateway, so the host has no route to the container and rootful lemond, which connects at the container's address, waited on llama-server until the test timed out. Only rootless Podman needs DNS off, and it reaches the container through a published port. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(ds4): move ds4:rocm to a container backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(containers): pick the ROCm container's GPU and check SELinux for /dev/kfd backends ds4:rocm is the first container backend that maps /dev/kfd. Its container gets HIP_VISIBLE_DEVICES for the GPU lemond sized it for, read from the KFD topology next to system_info's other KFD reads, and hosts with SELinux enforcing must allow containers to map GPU devices. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * ci(containers): restore the Dispatch container job's 4-hour timeout Four ds4 jobs downloading DS4's 81 GB checkpoint at once on fresh Dispatch machines each ran past 45 minutes. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(containers): run container backends from lemond.service with rootless Podman Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): create Podman networks without a DNS server Every model load failed under lemond.service with Podman 5 (Fedora 43/44, Ubuntu 26.04, Debian 13): netavark: error while applying dns entries: aardvark-dns failed to start: Failed to connect to user scope bus via local transport `podman network create` turns DNS on by default, and rootless netavark (1.14 and later) starts aardvark-dns with `systemd-run --scope --user`, which needs the account's systemd user manager. The lemonade system account has no login session, so it has none. Each per-model network holds one container, and lemond reaches it through its published port or inspected address, never by name, so the network needs no DNS server. Docker has no such option and is unaffected. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(lemond.service): let rootless Podman keep its runtime state in the host's /tmp Every model load failed under lemond.service on Ubuntu 26.04 and Debian 13: Error: setting up Pasta: pasta failed with exit code 1: Couldn't open PID file /run/lemonade/containers/networks/rootless-netns/rootless-netns-conn.pid: Permission denied Podman 5 sets up rootless networking with pasta, under $XDG_RUNTIME_DIR, which the unit set to /run/lemonade. The AppArmor profile Ubuntu and Debian ship for pasta allows writes only under /tmp, /run/user/<uid> and home directories under /home, so it denied the PID file. ProtectHome=yes hides /run/user, and the account has no login session to create /run/user/<uid> in any case. With XDG_RUNTIME_DIR unset, Podman uses its own fallback in /tmp (/tmp/storage-run-<uid>, or /tmp/containers-user-<uid> on Podman 4), which the profile allows and Podman's own tmpfiles.d exempts from age-based cleanup. lemond's own runtime directory stays /run/lemonade, through RuntimeDirectory=. PrivateTmp goes with it. In a private /tmp, `podman` run as lemonade from a shell finds no runtime state, and Podman 5 then refreshes the shared database: the running container drops out of lemond's view, `podman stop` reports no such container, and the engine keeps holding the GPU until the service stops. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(halogen): add the Halogen Flash container backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(debian): create /var/lib/cni at install On Ubuntu 24.04, every model load under lemond.service failed until the host next rebooted: Error: unable to find network with name or ID lemonade-<...>: network not found Podman 4's rootless network namespace bind-mounts a private directory over /var/lib/cni, or, while that does not exist, over its nearest existing parent, /var/lib. That mount hid /var/lib/lemonade, the lemonade account's home, which holds its Podman storage and network configs, so `podman run` found no network that `podman network create` had just made. Podman's own tmpfiles.d creates /var/lib/cni only at boot (`D!`), so a fresh install hit this until a reboot. The package now ships the directory in tmpfiles.d, which dh_installtmpfiles applies at install. The .rpm keeps lemonade's home in /opt, and Podman 5 makes no such mount, so neither needs it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(ds4): move ds4:rocm to a container backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(halogen): read the gfx1151 KFD node through system_info and report the setup steps Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(rocmfpx): add the ROCm FPX container backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): keep DNS on rootful Podman's per-model networks Podman 4's CNI backend gives an --internal network created with --disable-dns no gateway, so the host has no route to the container and rootful lemond, which connects at the container's address, waited on llama-server until the test timed out. Only rootless Podman needs DNS off, and it reaches the container through a published port. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(containers): pick the ROCm container's GPU and check SELinux for /dev/kfd backends ds4:rocm is the first container backend that maps /dev/kfd. Its container gets HIP_VISIBLE_DEVICES for the GPU lemond sized it for, read from the KFD topology next to system_info's other KFD reads, and hosts with SELinux enforcing must allow containers to map GPU devices. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(containers): mount a model directory one file at a time, for Halogen's tokenizer Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(api): regenerate for the rocmfpx section Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * fix(app): show container setup steps in a collapsible section The Setup guide button passed `action` to window.open, but lemond's `action` holds a command, steps, or a link. A non-link action now shows as a "Setup required" disclosure with the failure message and steps, regardless of the technical-details toggle; links keep the button. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(containers): check GPU device access instead of video/render membership Desktop distros such as Ubuntu and Arch grant the logged-in account /dev/kfd and /dev/dri access through ACLs, so an account outside video and render could use the GPU yet was told to fix its groups. The setup check now tests read/write access to /dev/kfd and each render node. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(containers): ask Podman its mode before the host check container_setup_failure() ran check_host() before check_podman(), so the first pass after startup guessed rootless and could report a GPU access failure on rootful Podman that the next pass cleared. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(containers): check Docker with docker info instead of a fixed socket The socket probe only looked at /var/run/docker.sock, so DOCKER_HOST, Docker contexts and Docker Desktop's socket read as a refused account. docker info follows the CLI's own connection, and its answer also identifies Docker Desktop and rootless Docker, which cannot run container backends, so those now get Podman as the fix step. The spec's device-node rows now describe the access check instead of group membership. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(lemond.service): keep PrivateTmp and give Podman's private /tmp state to tmpfiles.d |
||
|
|
07af4f36b1 |
feat(ds4): move ds4:rocm to a container backend (#3710)
* feat(backends): run container backends through ContainerManager, starting with llamacpp:nathanw Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(containers): list every missing setup step and ask for consent at install Container setup now reports what a user still has to do in one pass, in the order they do it, and the CLI finishes the install once only consent is left. - Setup checks run in two groups. Before consent: the container tool on PATH, then the video/render groups (or the Docker socket), then enable_containers. These read only PATH, groups and sockets, so no container command runs before the user opts in; Podman counts as rootful when CONTAINER_HOST is set or lemond runs as root, until podman info answers. After consent: podman info, then SELinux. - Every failed check is reported at once. /system-info gives one problem per line in message, numbered steps in action (install commands, group changes, enable_containers, and logging out last), and the failed checks' ids in setup_checks. - lemonade backends prints message and action lines side by side. - lemonade backends install, run and load check the backend's setup before installing or downloading anything. When enable_containers is the only step left, they show the existing warning, enable it on yes and finish the command; backends install --yes skips the prompt. Otherwise they print every problem and step and exit 1. - The spec, user guide, CLI and API docs follow the new order and fields. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V3HB9nm64VVxScERksHiia * fix(cli): read the selected backend only when recipe options were given lemonade run and load without a --<recipe> option have no recipe options, and reading the backend option from them aborted the CLI. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V3HB9nm64VVxScERksHiia * style(containers): trim the setup comments the comment-slop hook flagged Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V3HB9nm64VVxScERksHiia * ci(containers): gate the container smoke test like the other hosted test jobs The signing and release-branch skips exist to spare self-hosted runners; the smoke test runs on ubuntu-latest. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * ci(containers): pin the container smoke test to Ubuntu 24.04 The job installs the 24.04 .deb on the bare runner, and ubuntu-latest moves to 26.04 in November 2026, where libmbedcrypto7t64 does not exist. The comments now say why the job runs on the bare runner and needs the PPA. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): assert lemond's mode in the smoke test and log at debug test_03 now checks the published port on lemond's container, so each leg proves lemond detected the intended mode, not only that the tool runs in it. LEMONADE_CI_MODE puts llama-server's output in the uploaded logs, as in the other jobs that start lemond. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * ci: say why backends-gate also lists jobs that run on every PR Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): cut the container spec changes back to what the implementation made false Keeps the opt-in invariants (off by default, install and load refused while off, no container command before opt-in), rootful Podman's connection path, the Podman answers check, and reporting every failed check at once. Drops setup_checks, action ordering, CLI prompting, and the expect_rootless detail. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): name the enable warning instead of quoting it Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(llamacpp): list nathanw as a guest backend, as its descriptor declares Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(cli): word the enable_containers prompts as enabling containers, not backends The setting enables every container, whatever its tier, so the warning no longer calls the images community-built. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * chore(backends): drop the image allowlist comment from ContainerPolicy ContainerManager::allowed_image is the allowlist; the comment restated it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * refactor(containers): leave GPU selection and the SELinux check to the first ROCm container backend llamacpp:nathanw maps only /dev/dri, so nothing here reached the HIP_VISIBLE_DEVICES lookup or the SELinux check, both gated on /dev/kfd. needs_gfx1151_cwsr_fix goes back to its own KFD read. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): drop checks that restate code, and mount single files only The directory mounts serve Halogen's tokenizer and move to that PR; here every model file llamacpp names is a GGUF. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): take the smoke test's backend as --backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): leave Podman and Docker alone while enable_containers is false With containers disabled, lemond no longer sweeps at startup, connects to the Docker socket, runs `image inspect`, or removes images on uninstall. Setting enable_containers to false unloads every model running in a container first, so none is left that a later crash would orphan. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015BUXEd42tPQH67MQPW1XZh * Update to a modern pin * refactor(containers): drop the startup sweep A killed lemond's containers already stop and remove themselves: the attached `run --rm` child gets SIGTERM from PR_SET_PDEATHSIG and proxies it into the container. Verified with Docker and rootful/rootless Podman. The smoke test now kills lemond with a model loaded and checks no container remains. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * docs(load): list nathanw among the llamacpp_backend choices Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * ci(containers): cap the Dispatch container job at 45 minutes A hung job would otherwise hold a pool machine for up to 4 hours. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * test(containers): skip the killed-lemond check under rootful Podman Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * docs(containers): link container images to their registry pages Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): skip the killed-lemond check under rootful Docker too The Docker daemon owns the container, so whether it stops after lemond is killed depends on the docker client forwarding SIGTERM in time, which is racy. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01R5SJqLuAuPwGaJQvWTwMai * refactor(containers): drop the enable_containers setting Container backends no longer need an opt-in before they install or load. The setup assistant's remaining checks still report what is missing. - Remove the config key, its validation, getter and config effect. - Remove the CLI consent prompt and pre-flight check, and the --yes flags on `config set` and `backends install` that only served it. - Always check the Docker socket, read the image on disk for installed state, and remove the image on uninstall. - Remove helpers left unused: containers_enabled, Router::get_container_model_names, WrappedServer::runs_in_container, ServerProcess::in_container. - Update the spec, guides, generated API docs, tests and CI. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019cGBZamSKYLVeygD6axiu9 * perf(containers): run container setup checks once per system-info build The checks are host-wide, so every container backend got the same report while each one ran them again, `podman info` included. Drop the unused recipe and backend parameters from container_setup_failure and compute its report at most once per pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019cGBZamSKYLVeygD6axiu9 * test(containers): fail when listing labeled containers or networks fails A failed `ps` or `network ls` printed nothing, so the checks that expect no leftovers passed without listing anything. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019cGBZamSKYLVeygD6axiu9 * feat(containers): run container backends from lemond.service with rootless Podman Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): create Podman networks without a DNS server Every model load failed under lemond.service with Podman 5 (Fedora 43/44, Ubuntu 26.04, Debian 13): netavark: error while applying dns entries: aardvark-dns failed to start: Failed to connect to user scope bus via local transport `podman network create` turns DNS on by default, and rootless netavark (1.14 and later) starts aardvark-dns with `systemd-run --scope --user`, which needs the account's systemd user manager. The lemonade system account has no login session, so it has none. Each per-model network holds one container, and lemond reaches it through its published port or inspected address, never by name, so the network needs no DNS server. Docker has no such option and is unaffected. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(lemond.service): let rootless Podman keep its runtime state in the host's /tmp Every model load failed under lemond.service on Ubuntu 26.04 and Debian 13: Error: setting up Pasta: pasta failed with exit code 1: Couldn't open PID file /run/lemonade/containers/networks/rootless-netns/rootless-netns-conn.pid: Permission denied Podman 5 sets up rootless networking with pasta, under $XDG_RUNTIME_DIR, which the unit set to /run/lemonade. The AppArmor profile Ubuntu and Debian ship for pasta allows writes only under /tmp, /run/user/<uid> and home directories under /home, so it denied the PID file. ProtectHome=yes hides /run/user, and the account has no login session to create /run/user/<uid> in any case. With XDG_RUNTIME_DIR unset, Podman uses its own fallback in /tmp (/tmp/storage-run-<uid>, or /tmp/containers-user-<uid> on Podman 4), which the profile allows and Podman's own tmpfiles.d exempts from age-based cleanup. lemond's own runtime directory stays /run/lemonade, through RuntimeDirectory=. PrivateTmp goes with it. In a private /tmp, `podman` run as lemonade from a shell finds no runtime state, and Podman 5 then refreshes the shared database: the running container drops out of lemond's view, `podman stop` reports no such container, and the engine keeps holding the GPU until the service stops. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(debian): create /var/lib/cni at install On Ubuntu 24.04, every model load under lemond.service failed until the host next rebooted: Error: unable to find network with name or ID lemonade-<...>: network not found Podman 4's rootless network namespace bind-mounts a private directory over /var/lib/cni, or, while that does not exist, over its nearest existing parent, /var/lib. That mount hid /var/lib/lemonade, the lemonade account's home, which holds its Podman storage and network configs, so `podman run` found no network that `podman network create` had just made. Podman's own tmpfiles.d creates /var/lib/cni only at boot (`D!`), so a fresh install hit this until a reboot. The package now ships the directory in tmpfiles.d, which dh_installtmpfiles applies at install. The .rpm keeps lemonade's home in /opt, and Podman 5 makes no such mount, so neither needs it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): keep DNS on rootful Podman's per-model networks Podman 4's CNI backend gives an --internal network created with --disable-dns no gateway, so the host has no route to the container and rootful lemond, which connects at the container's address, waited on llama-server until the test timed out. Only rootless Podman needs DNS off, and it reaches the container through a published port. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(ds4): move ds4:rocm to a container backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(containers): pick the ROCm container's GPU and check SELinux for /dev/kfd backends ds4:rocm is the first container backend that maps /dev/kfd. Its container gets HIP_VISIBLE_DEVICES for the GPU lemond sized it for, read from the KFD topology next to system_info's other KFD reads, and hosts with SELinux enforcing must allow containers to map GPU devices. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * ci(containers): restore the Dispatch container job's 4-hour timeout Four ds4 jobs downloading DS4's 81 GB checkpoint at once on fresh Dispatch machines each ran past 45 minutes. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(containers): run container backends from lemond.service with rootless Podman Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): create Podman networks without a DNS server Every model load failed under lemond.service with Podman 5 (Fedora 43/44, Ubuntu 26.04, Debian 13): netavark: error while applying dns entries: aardvark-dns failed to start: Failed to connect to user scope bus via local transport `podman network create` turns DNS on by default, and rootless netavark (1.14 and later) starts aardvark-dns with `systemd-run --scope --user`, which needs the account's systemd user manager. The lemonade system account has no login session, so it has none. Each per-model network holds one container, and lemond reaches it through its published port or inspected address, never by name, so the network needs no DNS server. Docker has no such option and is unaffected. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(lemond.service): let rootless Podman keep its runtime state in the host's /tmp Every model load failed under lemond.service on Ubuntu 26.04 and Debian 13: Error: setting up Pasta: pasta failed with exit code 1: Couldn't open PID file /run/lemonade/containers/networks/rootless-netns/rootless-netns-conn.pid: Permission denied Podman 5 sets up rootless networking with pasta, under $XDG_RUNTIME_DIR, which the unit set to /run/lemonade. The AppArmor profile Ubuntu and Debian ship for pasta allows writes only under /tmp, /run/user/<uid> and home directories under /home, so it denied the PID file. ProtectHome=yes hides /run/user, and the account has no login session to create /run/user/<uid> in any case. With XDG_RUNTIME_DIR unset, Podman uses its own fallback in /tmp (/tmp/storage-run-<uid>, or /tmp/containers-user-<uid> on Podman 4), which the profile allows and Podman's own tmpfiles.d exempts from age-based cleanup. lemond's own runtime directory stays /run/lemonade, through RuntimeDirectory=. PrivateTmp goes with it. In a private /tmp, `podman` run as lemonade from a shell finds no runtime state, and Podman 5 then refreshes the shared database: the running container drops out of lemond's view, `podman stop` reports no such container, and the engine keeps holding the GPU until the service stops. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(debian): create /var/lib/cni at install On Ubuntu 24.04, every model load under lemond.service failed until the host next rebooted: Error: unable to find network with name or ID lemonade-<...>: network not found Podman 4's rootless network namespace bind-mounts a private directory over /var/lib/cni, or, while that does not exist, over its nearest existing parent, /var/lib. That mount hid /var/lib/lemonade, the lemonade account's home, which holds its Podman storage and network configs, so `podman run` found no network that `podman network create` had just made. Podman's own tmpfiles.d creates /var/lib/cni only at boot (`D!`), so a fresh install hit this until a reboot. The package now ships the directory in tmpfiles.d, which dh_installtmpfiles applies at install. The .rpm keeps lemonade's home in /opt, and Podman 5 makes no such mount, so neither needs it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(ds4): move ds4:rocm to a container backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): keep DNS on rootful Podman's per-model networks Podman 4's CNI backend gives an --internal network created with --disable-dns no gateway, so the host has no route to the container and rootful lemond, which connects at the container's address, waited on llama-server until the test timed out. Only rootless Podman needs DNS off, and it reaches the container through a published port. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(containers): pick the ROCm container's GPU and check SELinux for /dev/kfd backends ds4:rocm is the first container backend that maps /dev/kfd. Its container gets HIP_VISIBLE_DEVICES for the GPU lemond sized it for, read from the KFD topology next to system_info's other KFD reads, and hosts with SELinux enforcing must allow containers to map GPU devices. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(app): show container setup steps in a collapsible section The Setup guide button passed `action` to window.open, but lemond's `action` holds a command, steps, or a link. A non-link action now shows as a "Setup required" disclosure with the failure message and steps, regardless of the technical-details toggle; links keep the button. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(containers): check GPU device access instead of video/render membership Desktop distros such as Ubuntu and Arch grant the logged-in account /dev/kfd and /dev/dri access through ACLs, so an account outside video and render could use the GPU yet was told to fix its groups. The setup check now tests read/write access to /dev/kfd and each render node. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(containers): ask Podman its mode before the host check container_setup_failure() ran check_host() before check_podman(), so the first pass after startup guessed rootless and could report a GPU access failure on rootful Podman that the next pass cleared. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(containers): check Docker with docker info instead of a fixed socket The socket probe only looked at /var/run/docker.sock, so DOCKER_HOST, Docker contexts and Docker Desktop's socket read as a refused account. docker info follows the CLI's own connection, and its answer also identifies Docker Desktop and rootless Docker, which cannot run container backends, so those now get Podman as the fix step. The spec's device-node rows now describe the access check instead of group membership. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(lemond.service): keep PrivateTmp and give Podman's private /tmp state to tmpfiles.d |
||
|
|
a5b414b7fb |
feat(backends): run container backends through ContainerManager, starting with llamacpp:nathanw (#3709)
* feat(backends): run container backends through ContainerManager, starting with llamacpp:nathanw Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * feat(containers): list every missing setup step and ask for consent at install Container setup now reports what a user still has to do in one pass, in the order they do it, and the CLI finishes the install once only consent is left. - Setup checks run in two groups. Before consent: the container tool on PATH, then the video/render groups (or the Docker socket), then enable_containers. These read only PATH, groups and sockets, so no container command runs before the user opts in; Podman counts as rootful when CONTAINER_HOST is set or lemond runs as root, until podman info answers. After consent: podman info, then SELinux. - Every failed check is reported at once. /system-info gives one problem per line in message, numbered steps in action (install commands, group changes, enable_containers, and logging out last), and the failed checks' ids in setup_checks. - lemonade backends prints message and action lines side by side. - lemonade backends install, run and load check the backend's setup before installing or downloading anything. When enable_containers is the only step left, they show the existing warning, enable it on yes and finish the command; backends install --yes skips the prompt. Otherwise they print every problem and step and exit 1. - The spec, user guide, CLI and API docs follow the new order and fields. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V3HB9nm64VVxScERksHiia * fix(cli): read the selected backend only when recipe options were given lemonade run and load without a --<recipe> option have no recipe options, and reading the backend option from them aborted the CLI. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V3HB9nm64VVxScERksHiia * style(containers): trim the setup comments the comment-slop hook flagged Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01V3HB9nm64VVxScERksHiia * ci(containers): gate the container smoke test like the other hosted test jobs The signing and release-branch skips exist to spare self-hosted runners; the smoke test runs on ubuntu-latest. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * ci(containers): pin the container smoke test to Ubuntu 24.04 The job installs the 24.04 .deb on the bare runner, and ubuntu-latest moves to 26.04 in November 2026, where libmbedcrypto7t64 does not exist. The comments now say why the job runs on the bare runner and needs the PPA. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): assert lemond's mode in the smoke test and log at debug test_03 now checks the published port on lemond's container, so each leg proves lemond detected the intended mode, not only that the tool runs in it. LEMONADE_CI_MODE puts llama-server's output in the uploaded logs, as in the other jobs that start lemond. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * ci: say why backends-gate also lists jobs that run on every PR Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): cut the container spec changes back to what the implementation made false Keeps the opt-in invariants (off by default, install and load refused while off, no container command before opt-in), rootful Podman's connection path, the Podman answers check, and reporting every failed check at once. Drops setup_checks, action ordering, CLI prompting, and the expect_rootless detail. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): name the enable warning instead of quoting it Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(llamacpp): list nathanw as a guest backend, as its descriptor declares Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(cli): word the enable_containers prompts as enabling containers, not backends The setting enables every container, whatever its tier, so the warning no longer calls the images community-built. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * chore(backends): drop the image allowlist comment from ContainerPolicy ContainerManager::allowed_image is the allowlist; the comment restated it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * refactor(containers): leave GPU selection and the SELinux check to the first ROCm container backend llamacpp:nathanw maps only /dev/dri, so nothing here reached the HIP_VISIBLE_DEVICES lookup or the SELinux check, both gated on /dev/kfd. needs_gfx1151_cwsr_fix goes back to its own KFD read. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): drop checks that restate code, and mount single files only The directory mounts serve Halogen's tokenizer and move to that PR; here every model file llamacpp names is a GGUF. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): take the smoke test's backend as --backend Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): leave Podman and Docker alone while enable_containers is false With containers disabled, lemond no longer sweeps at startup, connects to the Docker socket, runs `image inspect`, or removes images on uninstall. Setting enable_containers to false unloads every model running in a container first, so none is left that a later crash would orphan. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015BUXEd42tPQH67MQPW1XZh * Update to a modern pin * refactor(containers): drop the startup sweep A killed lemond's containers already stop and remove themselves: the attached `run --rm` child gets SIGTERM from PR_SET_PDEATHSIG and proxies it into the container. Verified with Docker and rootful/rootless Podman. The smoke test now kills lemond with a model loaded and checks no container remains. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * docs(load): list nathanw among the llamacpp_backend choices Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * ci(containers): cap the Dispatch container job at 45 minutes A hung job would otherwise hold a pool machine for up to 4 hours. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * test(containers): skip the killed-lemond check under rootful Podman Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01LcAshvLHhLPAw6Ka6CJXwC * docs(containers): link container images to their registry pages Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * test(containers): skip the killed-lemond check under rootful Docker too The Docker daemon owns the container, so whether it stops after lemond is killed depends on the docker client forwarding SIGTERM in time, which is racy. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01R5SJqLuAuPwGaJQvWTwMai * refactor(containers): drop the enable_containers setting Container backends no longer need an opt-in before they install or load. The setup assistant's remaining checks still report what is missing. - Remove the config key, its validation, getter and config effect. - Remove the CLI consent prompt and pre-flight check, and the --yes flags on `config set` and `backends install` that only served it. - Always check the Docker socket, read the image on disk for installed state, and remove the image on uninstall. - Remove helpers left unused: containers_enabled, Router::get_container_model_names, WrappedServer::runs_in_container, ServerProcess::in_container. - Update the spec, guides, generated API docs, tests and CI. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019cGBZamSKYLVeygD6axiu9 * perf(containers): run container setup checks once per system-info build The checks are host-wide, so every container backend got the same report while each one ran them again, `podman info` included. Drop the unused recipe and backend parameters from container_setup_failure and compute its report at most once per pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019cGBZamSKYLVeygD6axiu9 * test(containers): fail when listing labeled containers or networks fails A failed `ps` or `network ls` printed nothing, so the checks that expect no leftovers passed without listing anything. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_019cGBZamSKYLVeygD6axiu9 * ci(containers): restore the Dispatch container job's 4-hour timeout Four ds4 jobs downloading DS4's 81 GB checkpoint at once on fresh Dispatch machines each ran past 45 minutes. Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(containers): run container backends from lemond.service with rootless Podman Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): create Podman networks without a DNS server Every model load failed under lemond.service with Podman 5 (Fedora 43/44, Ubuntu 26.04, Debian 13): netavark: error while applying dns entries: aardvark-dns failed to start: Failed to connect to user scope bus via local transport `podman network create` turns DNS on by default, and rootless netavark (1.14 and later) starts aardvark-dns with `systemd-run --scope --user`, which needs the account's systemd user manager. The lemonade system account has no login session, so it has none. Each per-model network holds one container, and lemond reaches it through its published port or inspected address, never by name, so the network needs no DNS server. Docker has no such option and is unaffected. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(lemond.service): let rootless Podman keep its runtime state in the host's /tmp Every model load failed under lemond.service on Ubuntu 26.04 and Debian 13: Error: setting up Pasta: pasta failed with exit code 1: Couldn't open PID file /run/lemonade/containers/networks/rootless-netns/rootless-netns-conn.pid: Permission denied Podman 5 sets up rootless networking with pasta, under $XDG_RUNTIME_DIR, which the unit set to /run/lemonade. The AppArmor profile Ubuntu and Debian ship for pasta allows writes only under /tmp, /run/user/<uid> and home directories under /home, so it denied the PID file. ProtectHome=yes hides /run/user, and the account has no login session to create /run/user/<uid> in any case. With XDG_RUNTIME_DIR unset, Podman uses its own fallback in /tmp (/tmp/storage-run-<uid>, or /tmp/containers-user-<uid> on Podman 4), which the profile allows and Podman's own tmpfiles.d exempts from age-based cleanup. lemond's own runtime directory stays /run/lemonade, through RuntimeDirectory=. PrivateTmp goes with it. In a private /tmp, `podman` run as lemonade from a shell finds no runtime state, and Podman 5 then refreshes the shared database: the running container drops out of lemond's view, `podman stop` reports no such container, and the engine keeps holding the GPU until the service stops. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(debian): create /var/lib/cni at install On Ubuntu 24.04, every model load under lemond.service failed until the host next rebooted: Error: unable to find network with name or ID lemonade-<...>: network not found Podman 4's rootless network namespace bind-mounts a private directory over /var/lib/cni, or, while that does not exist, over its nearest existing parent, /var/lib. That mount hid /var/lib/lemonade, the lemonade account's home, which holds its Podman storage and network configs, so `podman run` found no network that `podman network create` had just made. Podman's own tmpfiles.d creates /var/lib/cni only at boot (`D!`), so a fresh install hit this until a reboot. The package now ships the directory in tmpfiles.d, which dh_installtmpfiles applies at install. The .rpm keeps lemonade's home in /opt, and Podman 5 makes no such mount, so neither needs it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(containers): keep DNS on rootful Podman's per-model networks Podman 4's CNI backend gives an --internal network created with --disable-dns no gateway, so the host has no route to the container and rootful lemond, which connects at the container's address, waited on llama-server until the test timed out. Only rootless Podman needs DNS off, and it reaches the container through a published port. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(app): show container setup steps in a collapsible section The Setup guide button passed `action` to window.open, but lemond's `action` holds a command, steps, or a link. A non-link action now shows as a "Setup required" disclosure with the failure message and steps, regardless of the technical-details toggle; links keep the button. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(containers): check GPU device access instead of video/render membership Desktop distros such as Ubuntu and Arch grant the logged-in account /dev/kfd and /dev/dri access through ACLs, so an account outside video and render could use the GPU yet was told to fix its groups. The setup check now tests read/write access to /dev/kfd and each render node. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(containers): ask Podman its mode before the host check container_setup_failure() ran check_host() before check_podman(), so the first pass after startup guessed rootless and could report a GPU access failure on rootful Podman that the next pass cleared. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(containers): check Docker with docker info instead of a fixed socket The socket probe only looked at /var/run/docker.sock, so DOCKER_HOST, Docker contexts and Docker Desktop's socket read as a refused account. docker info follows the CLI's own connection, and its answer also identifies Docker Desktop and rootless Docker, which cannot run container backends, so those now get Podman as the fix step. The spec's device-node rows now describe the access check instead of group membership. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(lemond.service): keep PrivateTmp and give Podman's private /tmp state to tmpfiles.d |
||
|
|
fc865d1535 |
refactor(models): list every model file in server_models.json (#4041)
* refactor(models): list every model file in server_models.json The main checkpoint now downloads any exact file the variant names, and a variant naming a folder with no GGUF in it downloads that folder. ACE-Step and ThinkSound list their companion files as checkpoints, so the download check covers each file. The ACE-Step, ThinkSound, OpenMOSS and Moonshine select_checkpoint_files overrides are removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(backends): drop the note about the OpenMOSS duplicate download Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(models): let only the pull manifest mark a folder checkpoint in progress A stray .partial left in a snapshot by an unrelated file made every later pull of ThinkSound fail its final check. The manifest is what an interrupted pull leaves behind, so it alone marks a folder in progress, and the lookup climbs to the snapshot root so nested folders like Moonshine's see it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(backends): remove the select_checkpoint_files hook No backend overrides it any more, and the recipe argument that fed it leaves the file selectors with it. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
d752171f99 |
fix(server): apply default_model_source to built-in model downloads (#4002)
When default_model_source=modelscope is configured (e.g. via LEMONADE_DEFAULTS_PATH), pulling a built-in Suggested model by name still downloads from huggingface. - Apply the existing default-source policy to built-in entries before resolving repository artifacts, cache paths, and collection manifests, and invalidate the model catalog cache when default_model_source changes. - Keep existing download source behavior for explicit requests and user models, and only mark a download complete when it matches the current source. Fixes #3991 |
||
|
|
2830855960 | fix(server): add missing backend args (#4021) | ||
|
|
c306b768e0 |
feat(backends): add TheNoise CUDA support (#4001)
* feat(thenoise): enable portable CUDA backend on Linux * chore(backends): regenerate TheNoise CUDA support metadata * fix(thenoise): restrict linux to x86 |
||
|
|
f9004ca0a8 |
Adding zero-shot classifier support (#3952)
* main into zero shot, post refactoring * cleanup * cleanup * CR feedback: fixed the residency document clarification bug * cr feedback: fake tests with propoer assertions * pr feedback: better policy checks and logging for backend failures * pr feedback: adding on_truncation * pr feedback: adding the truncation support for classifier and fixing documentation issues * CI fix and doc enhancement * pr feedback: fixed edge cases * added check for 0.3.7 truncated verification * Added the example lfm2 ONNX model * pr feedback: added max-length and 3 flag truncate flags * pin bump to 0.4.0 and more tests for zero-shot * CI fix * pr feedback: clarified on the PII detector |
||
|
|
57e63bff98 |
fix(auto-tune): never refuse a load over a context estimate (#3986)
Two parts of the context-sizing rework refused models that load and run on v2026.43.3, such as gpt-oss-120b on a 128 GB Strix Halo: - The shared-memory cap subtracted system RAM in use from the iGPU pool (VRAM carve-out + GTT, half of RAM by default on Linux) instead of from total RAM, leaving ~41 GiB. - When the budget came up short, the load threw instead of using the fallback context. The budget assumes full GPU residency, but llama.cpp's own fitting spills layers to host RAM. The iGPU cap now uses total RAM, and a short budget resolves to the fallback context, so resolved_ctx_size is always a number again. Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
fb8935641c |
Model Manager refactoring (#3828)
* draft model manager refactoring
* draft model management spec
* address review comments
* remove eol
* remove some non-relevant comments
* step 0: tests
* step 1: move recipe option store
* step 2: locator
* step 3: artifact transfer
* step 4a: store_builder
* step 4b: store_snapshot
* step 4c: catalog
* step 5: change notifier, generation on the snapshot
- ModelChangeNotifier with two signals and one subscriber each; ModelManager
owns it and Server registers both routing subscribers on it
- StoreSnapshot::helper_models computed at publish by collect_helper_models();
Server::active_policy_helper_models() and the startup seed block are gone
- notify_models_changed fires the snapshot generation; notify_generation_ and
next_notify_generation() deleted
- fix: build_cache no longer mints a generation on a read that changes nothing,
which had made generation-based coalescing impossible
- fix: set_model_update_available_for_test wrote the cache without publishing
- test_change_notifier: 16 checks, CI ON
* step 6a: RegistryId and the registry descriptor table
- RegistryId (string, no enum) plus RegistryDescriptor holding the per-host
spellings, display name, scheme prefix, cache-dir prefix and default revision
- model_registry.cpp vocabulary and cache-dir naming read the table; the enum
no longer carries facts of its own
- registry_id_from() yields nullopt for an unknown host, the primitive behind
the spec's warn-and-skip delta (not wired to the load path yet)
- fix: descriptor_for() returned a pointer into a by-value vector
- registry_id.cpp compiled into the CLI as well; it does not link core
- test_registry_identity: 18 checks, CI ON
* step 6b: remove RemoteRegistrySource; registries are strings
- model_registry.h exposes models::RegistryId; the enum is deleted
- function names unchanged, only the carried type: parse/name/display/scheme/
is_remote/detect_url/search/cache_dir_name/model_registry/ModelRegistry::source
- require_descriptor() throws when a caller invents an id
- test/app/app-regression/registrySearch.test.cjs slices model_registry.cpp by
literal text; updated to match, and added to the standing gate list
- Locator now carries optional<RegistryId>
* test: pin the unknown-registry load-path delta
A persisted entry naming an unregistered host warns naming model and id,
contributes no entry, and leaves the rest of the catalog loading. That is
already the behavior via parse_model_source_fields throwing inside the
per-entry catch in build_cache; this pins it so a later step cannot regress it.
Test-only: ctest 81/81, app regression 136/136.
* step 6c': backends stop naming hosts
6b renamed the hf/modelscope dichotomy instead of removing it. Backends may
handle a source differently, but not by splitting the world in two hosts.
- vLLM quant probe: the identity test became an endpoint fact, the URL is built
from the descriptor, and the hand-rolled "models--" + $HOME cache naming uses
hf_cache::repo_id_to_cache_dir_name() + get_hf_cache_dir(). Passing the repo id
rather than the raw checkpoint also fixes a latent miss for repo:variant ids.
- RegistryDescriptor gains endpoint_default; empty for ModelScope, which serves
files through its API, preserving today's never-fetch behavior.
- FLM no longer guesses Hugging Face when the model manager is absent; both sites
throw, as vLLM already did.
- dropped two unused default args that asserted a host.
Remaining sites for step 7 (vllm snapshot branch, flm --modelscope argv, whisper
resolve URL) need a port fact and are recorded in the plan.
Gates: ctest 81/81, cli2 73 OK, endpoints 171 OK, llm/vulkan 31 OK.
* step 6c: ArtifactSource, FetchableRepository, registration macro
- ArtifactRef names a checkpoint; from_locator carries the path for bytes that
came from no host, so two files never share a ref
- ArtifactSource answers resolve/present/acquisition/deletion for one checkpoint
- FetchableRepository layers the pullable role on it; the whole interface is
implementable from the value types alone
- LEMONADE_REGISTER_ARTIFACT_REPOSITORY is now the single writer of the
descriptor table: seeded deque (pointer stability, not vector), replace on same
id, first factory kept with duplicate claims reported rather than link-ordered
- RepositoryDescriptor and descriptor() deliberately absent; the spec lets step 12
add them with a default
test/cpp/test_artifact_source.cpp, CI ON, 20 checks, mutation-checked twice.
Gates: ctest 82/82, app regression 136/136, cli2 73 OK, endpoints 171 OK,
llm/vulkan 31 OK.
* step 7a: artifact_resolver
* step 7b: fetchable_repository
* step 13: scancatalog
* step 7c: artifact_resolver
* move npu download
* step 7f: vllm/flm download
* reduce comment slop
* step 14: ListedCatalog per provider, and locality leaves the design
Cloud listing becomes one catalog per installed provider, so an
unreachable provider costs only its own entries.
CloudServer::discover_provider_models() owns the credential and
plaintext-endpoint guards for every caller of a listing, which deletes
the duplicated guard block in refresh_cloud_models() and orphans
CloudOps::discover_models().
CatalogDescriptor replaces the id()/required() overrides and carries
{id, required} only. Locality is deleted from the design rather than
introduced: every minter already distinguishes itself in the name it
emits (provider id leading a listing name, -FLM for discovery, the
parent-directory qualifier for the scan), nothing splits a name on '.',
and no persisted format ever carried a middle segment. Registering
user.<provider>.NAME is therefore settled by precedence, documented,
not by a vocabulary guard. The startup duplicate-claim check goes with
it: with no minter minting a locality it could only fire on a false
positive, and its remedy was to drop a provider's whole model set.
Gates: ctest 86/86, app regression 136/136, cli2 73 OK/2 skip,
endpoints 171 OK/3 skip (mock-provider cases ran), llm/vulkan 31 OK/2 skip.
* step 15: json_catalog
* step 15b: registry documents
* cleanup
* step 8a: update scan
* step 8b: model sync
* fix ci tests
* step 9a: delete plan
* 9b: artifact store
* 9c: download policy
* 9d: npu_cache
* 9e: ingest
* 16: labels
* merge fix
* step 17-i: delete shards
* step 17-ii: fix and enable tests
* step 10a-b: alias manager + resolve()
* step 10c: every surface resolves through the manager.
* step 10d: fixes
* step 11: ModelManagerConfig
* step 12a: docs
* step 12b: model catalogs
* step 18a: start build cache work
* step 18b: catalogsetdeps
* step 19: catalog_locator
* step 19b: http catalog locator
* step 19c: configurable model catalogs
* step 20a: read capability hints only from the keys that carry them
* step 20b: a rebuild stops re-fetching a catalog it just read
* step 20c: a fetched catalog has a size limit and its cache an owner
* step 21a: a read stops taking the model store lock
* step 21b: the store lock covers the commit, not the composition
* step 21b-i: a commit stops walking the filesystem
* step 21c-i: publishing derives the name tables
* step 21c-ii: a write seeds a draft and the publish moves it out
* step 22: a filter test states the machine it means
* step 23: the update flag a scan publishes gets a gate
* step 26+27: the machine probe and the name tables leave the facade
* remove excessive comment
* step 28: modelstore
* step 29: CloudRows
* step 30: move build_cache
* step 31: store patches
* step 31 followup
* port PR #3882
* probes
* P0: the facade-shape gate reads both include spellings and one-way budgets
* P1: the dependency graph points one way
Every file under src/cpp/server/models/ included the facade header, so the
DAG read bottom-up: the layer existed in directories but not in reality. The
reason was structural. ModelInfo — the value object that crosses the whole
server by value — lived in the facade header, so anything that took a
ModelInfo had to name the orchestrator to spell its arguments.
ModelInfo, ModelFileInfo, and GgufMetadata move to models/model_info.h;
UnknownModelError and InvalidModelDefinitionError move to
models/model_errors.h. The facade now includes the leaves, never the other
way: the ratchet pins the models layer's facade-header count at zero, and
the include-graph grep confirms it. Consumers of the moved types got the
explicit include they were borrowing through the facade, including auto_tune.h,
which named no model header at all and worked by accident.
The same inversion hid inside ArtifactRef. A ref is an address — repo,
revision, variant — and two refs that compare equal name the same bytes; but
it also carried `const ArtifactLayout* layout` and a sibling path, so the
resolver had to mutate the address before handing it to a repository, and
placement — which is a property of where the bytes land — became part of what
an address is. Placement moves out: the resolver answers a SourcePlacement
beside the ref, create_repository takes it, FetchableRepository holds it,
and ArtifactRef is back to a value that can travel alone. The
sibling-layout tests now assert the binding where it lives, on the source.
Three headers are public, and the spec's Source Layout section says so:
model_manager.h (behavior), model_info.h (the value object), store_snapshot.h
(the read-only set a consumer holds). A fourth consumer, server.cpp, reads only
the snapshot, so it left the escape whitelist; auto_tune.h joins the sanctioned
side by naming model_info.h. The line budget travels 1103 -> 1105 for the two
includes model_manager.cpp took on to stop borrowing them transitively.
Gate: cpp-ci 114/114; endpoints 178 OK / 3 skip; llm/vulkan 31 OK / 2 skip;
whisper 12 OK / 2 skip; cli2 73 OK / 2 skip; app 136. Mutation-checked: the
facade-header ratchet at zero, a private models header reaching a consumer in
both include spellings, a sanctioned include passing unflagged, and a retired
whitelist name demanding deletion.
* P2a: the token stops bytes, and credentials stay on their origin
Cancellation had no parameter. A download noticed a cancel only when a
progress report happened to return false, so a stalled transfer with no bytes
and no reports could not be cancelled at all, and every caller that wanted to
stop one had to smuggle the request through the reporting channel.
utils::RequestCancelToken already existed for inference; it lived in
utils/http_client.h, out of reach of a transfer seam that must not know about
HTTP. The token moves to its own leaf, utils/cancel_token.h, as
utils::CancelToken — the same currency for inference and for model transfers —
and download_file, download_attempt, ArtifactTransfer::execute and
FileTransfer::transfer all take it. ByteProgress returns void: it reports
bytes, nothing else. A DownloadProgressCallback that returns false now closes
the update channel instead of secretly cancelling, and the only message that
stops a plan is the token, checked before each file and on every curl tick.
The second owed defect was credential scope. Rule 2 of Transfer And Layout
says a repository's auth_headers() travel only while the origin still matches
the origin that minted them, at every hop. libcurl re-sends custom headers to
any host a Location names, so the download no longer lets libcurl follow: it
walks the hops one request at a time, drops the header list at a cross-origin
boundary and never restores it, enforces the policy's scheme set on every
target itself, and refuses a 3xx body into the partial file. Production
behavior is unchanged — ExternalHttpsOnly is still the default policy — and
HttpFileTransfer gained the policy seam the fixture has been asking for in a
comment since it was written.
The token is wired where cancels are born: the download job hands the worker a
flag its cancel endpoints set, so a cancel stops bytes on the next socket tick
rather than at the next progress report; the legacy streaming path answers from
socket death; the pull chain carries it from the facade through ingest and the
BackendOpsContext down to the transfer.
Gate: cpp-ci 115/115 including the new FileTransferTest (the spec's
test_file_transfer, 21 checks over two loopback origins: credential kept
direct and on a same-origin redirect, stripped cross-origin, never restored
after a strip, disallowed redirect scheme refused before bytes, one mixed
scheme plan one progress total, a file://-only plan, mid-transfer cancel with
the partial preserved); endpoints 178 OK / 3 skip; llm/vulkan 31 OK / 2 skip;
whisper 12 OK / 2 skip; cli2 73 OK / 2 skip; app 136; a real 174 MB Hugging
Face pull in 3.2 s through the manual-hop engine. Mutations by exit code:
token check removed, cancel dies mid-transfer; strip disabled, the cross-origin
check fails; strip unconditional, the same-origin check fails; progress-false
made cancel again, the mute test dies. M1 is what surfaced the redundancy the
mutation was meant to prove: two channels watched the token in the tick; the
wrapper's copy is gone and the HTTP client's is the one place. Restores
verified, grep MUT zero.
* P2b: the main pull plans through the repository seam
Every checkpoint of a pull is an ArtifactRef bound to one FetchableRepository;
the file set is registry_download_plan's, auth headers come from the source, and
no ModelRegistry survives in the download path. The reuse merge, manifest,
pinning and provenance stay where the spec puts them.
test_pull_registry drives the whole ModelManager against scripted sources:
exact URL plan, snapshot placement, pins, manifest lifecycle, refusal words,
and a pre-set cancel token that leaves no artifact.
Facade ceiling 1106 -> 1107 for the repository_for wiring line.
* P2c: the update scan asks sources, not registries
Each (source, repository) group opens a FetchableRepository, honors
can_go_stale() before opening its mouth, lists latest and previous through
list(), and takes its headers from the source. registry_for and its legacy
ModelRegistry& are gone from UpdateScanDeps and the facade config; the
artifact-aware refinement stays in registry_files, composed as before.
test_update_available ports to StubRepository and gains three checks for the
frozen-source rule: never listed, reports nothing, moves no flag.
Facade unchanged at 1107 lines.
* P2d: the registry class lives with its adapters, nowhere else
model_registry.h moved out of the public include path into src/cpp/server/,
and only model_registry.cpp and models/registry_repository.cpp may name it --
the facade-shape gate now enforces that named set. Wire facts (file trees,
search rows, provider names, cache-dir naming) moved to
lemon/models/registry_types.h, a public leaf: they persist on disk, so their
shape is public by design. RepoListing carries the host's raw_metadata.
Search became a source answer: FetchableRepository::search with the
supports_search() gate, exposed through ModelManager::search_registry so the
API layer keeps talking to the facade. hf_variants reads variants through
create_repository.
Standing acceptance rule: store, sync, ingest, scan and the facade pair carry
zero provider string literals; only the adapter pair names the legacy header.
Both mutation-proven this phase.
Facade 1107 -> 1124 lines for search_registry.
* P3: provenance learns which checkpoint landed where
v1 files read forever, verbatim. A v2 write keeps the v1 sentence in the main
repository's file and adds checkpoints[type] = {selection, snapshot_id}; an
auxiliary repository -- which v1 refused to let speak at all -- now records
only its own checkpoint under version 2, so a shared side cache can name every
model that filled it without any of them claiming the whole.
The pull commit loop names the slot per repository. RegistryProvenanceTest
pins v1 read, v2 shapes, the shared aux file and moved-snapshot bookkeeping;
PullRegistryTest pins them after a real pull.
Mutation-proven: the v1 answer, the aux guard and the slot routing each have
a check that dies without them.
* F4 trim: a locator reads, it does not probe
CatalogLocator::changed() had no production caller -- invalidation is event
driven (watcher, settings write, ingest) and fetched bodies are windowed
(fresh_for plus conditional GET), so a standalone HEAD round trip was dead
weight with a live cost. It, both implementations, and HttpClient::head are
gone; the spec's staleness rows now describe what the read observes rather
than a probe nobody runs.
CatalogState stays: it is what read() hands back so the next read asks
conditionally. CatalogLocatorTest keeps the read-side truth, minus the probe.
* P4a: the store owns its build and its patches
ensure_current holds the compose retry loop -- the facade's build_cache is one
line now. StorePatches is gone: patch_download, patch_removed and patch_options
are ModelStore methods, the artifacts store arriving per call so the store
keeps no dependency of its own. The bodies moved verbatim; the tests moved
with them and lost nothing.
Facade 1124 -> 1097: the one-way ceiling pays a refund this phase.
Mutation-proven by test_compose_retry (attempts 1 -> both retry checks die).
* the repository seam is explained once, where it is filled in
Three structs restated which source answers for a checkpoint. ModelManagerConfig
is the origin -- ingest and update scan take it by assignment -- so it keeps the
explanation and the plumbed copies just point at it.
* callback bags shrink where the collaborator was restyled, not tested around
UpdateScanDeps stops restyling the artifact cache as three lambdas - the
disk baseline and the processed-snapshot fast path now read the
ModelArtifactStore itself, and the registry-source rule collapses to the
one free function that already owned it. ModelIngest drops its pin and
patch_downloaded wrappers and calls the registries and store it already
holds.
Read paths stop copying the world to answer one question: the facade
publishes snapshot(), and model_get, model suggestions on a miss, the
register echo, and the two MCP 'find a local model' walks read rows
instead of cloning maps. The echo regains an assertion in
test_000a, which the mutation check proved it needed.
* the facade declares no test hooks and holds no override members
The four hooks existed because substitutions had nowhere else to live.
They have somewhere else now:
- test_extra_model_discovery drives ScanCatalog directly; the device
rule for the operator's directory moved onto the catalog itself.
- test_model_sync_and_auto_update drives SyncService with its own deps
- canned scan, download recorder, phase bus - so the queue state
machine is tested at the queue, not through eight ModelManagers with
their real behavior patched out. The stale-flag case now proves the
stronger thing: a set flag never downloads a model on its own when
the fresh check fails.
- the phase callback and both override members are deleted with their
setters; FacadeShapeTest's four-name whitelist becomes two zero
assertions - no _for_test anywhere under src/cpp, no *_override_
member in the facade header - and a probe hook planted in an
unrelated product file trips the gate by name.
Facade: 1088 -> 1076 lines; header sheds 33.
* options are a read and a write, named as the spec names them
The facade spoke about options in six verbs; the spec knows two. GET,
POST dry-run, DELETE, the load-time save and the load-time tombstone
layer now share one read - options(name[, changes]) returns the entry,
the layering beneath it, and what changes would resolve to - and two
writes: set_options merges, replace_options replaces. preview_saved was
the clearest smell: what-a-write-would-produce is a read, so it lives
in the read.
FacadeShape grows honest ceilings: facade lines 1082, header method
declarations 71, members 15 - all one-way, so shrinking owes no edit
and growing names itself. The counters earn their numbers: planted
declarations and members are counted and refused.
* the facade locks twice and waits never
Both direct locks are the options file's write ordering, documented
where they sit; publishing has exactly one road, StoreWrite. Ratcheted
so a third lock has to argue for itself.
* check_updates and sync_status, the names the spec uses
Two renames onto the facade surface the spec already spells; nothing
else moved. Live proof: update-models --check and the update/sync
endpoints pass against a fresh server.
* checkpoint_status[] on the wire, and the spec says what the code does
Every checkpoint of every listed model now answers for itself - type,
present, required, registry, path - from the same ArtifactSources a pull
would open. Building that read exposed a real seam gap: source_for
never threaded ModelManagerConfig.repository_for, so a fixture host was
obeyed by pull and scan but bypassed by status; it now reaches every
consumer, and test_pull_registry pins the whole answer, honest scripted
presence included.
The wire contract earns its pins: /v1/models rows carry a present,
required, path-bearing main entry for a downloaded model and a boolean
update_available; docs/api shows both fields with their entries; the
app refuses to export checkpoint_status into a portable file, because
its paths belong to one machine.
Spec reconciliation, the CODE->SPEC list closed: the facade section
describes the shipped surface - snapshot reads, the options read/write
pair, config-as-the-only-door with the zero-hook gate named - and says
outright there is no ModelView and no generated model-object pass, with
the drift guards that actually exist in its place. Source Layout lists
the four public models headers and the private registry header;
staleness item 5 reads as event-plus-window, CatalogLocator::changed()
dead; test_update_available names repository_for; ModelSyncServiceTest
is no longer an aspiration - the suite is renamed to it.
Facade ceiling 1109 with checkpoint_status; declaration ceiling 72.
* S1: the spec describes shipped code, not the design it preceded
docs/dev/specs/model-management.md had drifted from what the tree does in ten
places. Each was checked against the implementation before being rewritten:
- Catalogs are objects built per store build by `product_catalogs()`, not
singletons; the six shipped ones are named with their rank, claim, and the
three input shapes (pinned document, `CatalogLocator`, callable).
- Locators: `file_catalog_locator` and `http_catalog_locator` are the two that
ship, with their read policy, cache pair (`<id>.json`, `<id>.json.validators`,
body written first), and the 8 MB body cap. No resource locator: the built-in
registry arrives already read via `RegistryDocuments`.
- Store: `resolve()` returns `ResolvedModel`; there is no `model_path()`, no
`ModelView`. `StoreWrite` is the composition's write type; it is still public
on the facade, which is recorded as a known gap rather than a rule.
- `checkpoint_status[]` reads presence from `ArtifactSource::present()`, so it
can disagree with `downloaded` on an interrupted pull. Documented as shipped.
- SyncService is `src/cpp/server/models/sync_service.{h,cpp}` with the real
enqueue/wait/cancel surface; `models_changed` carries a `reason` and a
generation that changes on catalog mutations only.
- Docs section: the real descriptor structs (`RegistryDescriptor`, `DocEntry`,
`CatalogDescriptor`), the real region markers and region names, and the
host_specific rule that keeps a machine-dependent row out of a committed page.
Removed the probe-and-detector table row, which described a mechanism deleted
before this spec section was last touched.
No code changed; generators and cpp-ci are unaffected (119/119 re-verified).
* S2b: SyncService started its worker before stop_ existed, and no test had a bound
ModelSyncServiceTest hung often enough to be killed by hand. Tracing the
worker's transitions showed the cause in product code: sync_service.h declared
`std::thread worker_;` before `bool stop_ = false;`. Members initialize in
declaration order and constructing the thread starts it, so run_worker()'s
first act -- waiting on `stop_ || is_sync_running` -- read stop_ before its
initializer ran, with no synchronization. Memory that happens to read non-zero
makes the worker believe it was already asked to stop, so it returns at once:
the service is dead on arrival, is_sync_running stays true, and
wait_until_idle()/wait_for() block forever. That fits every observation --
intermittent, load-sensitive, and blocked at 0% CPU with every thread in
futex_wait.
Fix: move the stop flag into State, where it initializes with the rest of the
guarded state and lives under the mutex the worker waits on, and leave worker_
declared last so the invariant is visible at the declaration. Router and
JobManager use the same wait idiom in the correct order; SyncService was the
only instance. As a backstop, both waits now also wake when the worker has
exited and log a warning instead of waiting for a transition that can no longer
happen, so a future dead worker costs a wrong status rather than a hung request
thread.
test_model_sync_service.cpp also had a real use-after-free of its own: every
parking scenario declared the SyncService before the state the worker parked on,
so ~SyncService joined after those locals were freed, while bus.sink still
captured them by reference and was never cleared. One PhaseGate now owns the
park, is declared before the service, takes itself off the bus in its
destructor, and bounds both directions of the rendezvous, so a missed phase is a
named FAIL instead of a hang.
New regression test constructs 200 services in a row and requires each to run
its first generation within a deadline; forcing the worker to stop on entry
makes it fail on attempt 0 in all three runs.
Every test now carries a ctest TIMEOUT (default 120s, 300s for the two whose
runtime is defined by waiting on a timeout constant) so a stuck test is one red
line instead of an unattended run: 143 at 120s, 2 at 300s, measured against a
suite whose slowest test is 14s and 115 of 119 finish under 0.3s.
cpp-ci 119/119; 960 sync-test runs at 16-way concurrency with no stall and no
failure, against 5 stalls in the first 32 runs before the fix.
* S2: the shape gate now counts what it claims, and measures what was unmeasured
Four rules in test_facade_shape were reporting something other than the truth.
Members (G1): the count was lines ending `_;`, so `cloud_registry_ = nullptr;` and the
two-line `catalog_fetch_clock_ = std::make_shared<...>()` were invisible and a new member
written with an initializer would never trip the ceiling. Members are now counted by
declaration: comments stripped, statements split on `;`, class-body indentation, angle
depth tracked so `std::function<std::string()> x_;` is a member while `void f();` is not.
Honest count is 18 -- the review that opened this step said 17 and was itself one short,
missing `default_model_source_provider_`, whose type contains the `()` that hid it from the
grep the count was based on.
Substrings (G3): `find_in(file, "model_registry.h")` counted a sentence naming the header,
and an include someone commented out counted too. Includes are now parsed from lines whose
first non-blank character is `#`, over comment-stripped text.
Direct-only includes (G2): the escaping whitelist saw `#include <lemon/models/...>` but not
the relative spelling, and it missed the more serious fact that a whitelisted *header* hands
models types to everything that includes it. A new named set lists the headers allowed to
re-export the models layer -- five of them -- and a failure prints what each one drags in.
Whitelisting `backend_ops.h` for `ArtifactFetchService` really does reach every backend that
includes it, and that is now visible instead of implied.
Shrink-punishing ratchets (G4): every "at most" needle failed when the count went *down*
with "ceiling is stale", which is exactly the churn the refactor wants. They now fail only
over the ceiling and print a note asking for it to be tightened.
Three rules that did not exist, all needed by later steps: the facade header's reach
(29 product files, one-way -- three include spellings, and the bare `#include
"model_manager.h"` used by the backend tree accounts for 7 of them), `StoreWrite` confined
to the facade, and in-flight markers (`.download_manifest.json`, `.partial`) confined to the
eight files that can currently decide presence. That last one is the shape of D2/R1: presence
has two authorities today, and the list is what S5 has to shrink.
Eleven mutations, all as required. Two caught defects in the new code rather than confirming
the old: may_only_shrink reported "unexpected" and then still passed when every whitelisted
name happened to be present, and the member counter returned 1 until the statement splitter
was fixed. kRulesVersion prints with the results so a binary older than the tree is visible
in the output rather than inferred from an impossible failure.
cpp-ci 119/119.
* S2b: nothing any more stops a cpp test from dialing out or forking
The hermeticity audit came back clean -- no C++ test needs external HTTP or a
running lemond, so none was deleted -- and an audit is worth exactly as much as
the rule that keeps it true. Two checks, both seeded at the honest zero.
A non-loopback host *name* is not the thing to ban: test_model_registry.cpp,
test_cloud_provider_registry_config.cpp and test_config_default_source.cpp pass
huggingface.co, api.fireworks.ai and friends to pure functions to check URL
building and endpoint classification, and a blanket ban would tax the tests that
verify URL handling. The rule is a non-loopback host and a request on the same
line, over comment-stripped text.
Only the named test spawns a process, with test_process_manager.cpp on the list
because process management is its subject. A test that spawned lemond would also
make one test's server another test's interference: ctest runs these in parallel.
Three mutations: a real HttpClient against huggingface.co fails, the same line
commented out passes (so the rule reads code, not prose), and a popen added to
another test fails. The gate caught itself on the first run -- it holds the token
tables as data and matched its own patterns -- so it is excluded from the two
scans over test/cpp, which costs nothing since it neither dials out nor forks.
Why the count is zero is written in the gate's comment: every create_repository()
call in test/cpp stops at resolve()/acquisition(), a plan and a path with no
request, and test_update_available.cpp injects config.repository_for. A reader
can then tell a rule that holds from a rule nobody ever checked.
cpp-ci 119/119.
* S3: declaration order is initialization order, and the declaration ceiling was fiction
ModelManager declared registries_, recipe_options_, architecture_defaults_ above config_
while its init list wrote config_ first. Actual construction follows the declarations, so
alias_manager_(config_.cache_dir) ran after config_ only by luck of where the members
happened to sit: registries_ and recipe_options_ build from static helpers and read no
member. Give that file a member that reads config_ in its initializer, placed above
config_, and it reads an object that does not exist yet -- which is not a hypothetical, it
is how SyncService hung. Declarations now run config_, extra_models_dir_, alias_manager_,
registries_, recipe_options_, and the init list already matched.
Found by asking for -Wreorder explicitly, which the build never does: no -Wall anywhere,
so this defect class is invisible otherwise. The same warning fired on WrappedServer, whose
init list wrote last_backend_activity_ before instance_id_ while declaring them the other
way round; both initializers are independent, so it was cosmetic, and it is aligned too.
recipes_all_models_filtered_snapshot() had exactly one caller, a test, and differed from the
public recipes_with_all_models_filtered() by a build_cache(). Deleted: the concurrent reader
now uses manager.snapshot()->empty_recipes(), a public non-rebuilding const read that already
existed, so the side-table exposure goes away without weakening what the test stresses.
Also, the header declaration ceiling measured nothing. It counted `);` occurrences across the
whole file -- missing every method ending `) const;`, counting doc comments -- and reported 71
against a ceiling of 72 while ModelManager's own brace depth holds 87 function declarations.
It now counts declarations at class scope, nested type bodies excluded, and the ceiling says
87; adding one method fails, which the old counter could not do. S8's real starting surface is
87 declarations across 29 includers. The re-export detail dump printed on every run including
passes, where it read like a failure; it prints on failure now.
cpp-ci 119/119, cli2 73 tests OK, gate green, comment gate 0.
* S4: a recipe is policy, so it stops riding in an address
ArtifactRef carried `recipe` while operator== ignored it. That is a field which changes what
a plan contains and asserts nothing about identity: two refs equal as addresses produced
different downloads. It is what lets the shared plan builder reach for a recipe at all, since
the only way registry_download_plan could ask which files a model wants was through the ref
handed to it.
Moved to SourcePlacement, beside the layout and sibling it already travelled with, and read
back through repository.recipe() where the plan is built. Placement is resolver output, was
already threaded through create_repository, RepositoryFactory, both registration macros and
the FetchableRepository constructor, so this is a field move and a getter rather than a new
channel. The four mint sites stopped setting it; placement_for() and the host-scheme branch
set it; ingest builds one placement per pull, because every checkpoint of a pull belongs to
the same model and so to the same recipe; update_scan does the same for its probe.
checkpoint_type stays, and the header now says why the two are treated differently: which
checkpoint is a question about bytes, which recipe is a question about what to do with them.
The probes in hf_variants and search_registry needed no change -- they list and search and
never build a plan, so an empty recipe was already the right answer for them.
The new layout test asks the question the field used to make unanswerable: the same ref under
two placements yields plans that differ only in the files the policy selected and agree on the
destination. Moonshine was the natural second policy and throws when a listing has no folder
by that name; ThinkSound wants a fixed set of audio files and finds none in the fixture, which
says the same thing without an exception.
cpp-ci 119/119, whisper 12 OK (2 skipped), generators --check, comment gate 0. Whisper needs
XDG_RUNTIME_DIR pointing somewhere writable in the server's environment before it will load
anything; recorded because the error it produces otherwise reads like a model-load failure.
* S5: presence gets one implementation, and it takes a path rather than a source
downloaded and checkpoint_status[].present were computed twice, differently. The store
applied existence, in-flight markers and backend validation; LocalPathArtifactSource applied
existence plus validation; a registry checkpoint applied existence alone. An interrupted
download reported downloaded:false beside present:true, and a repository holding an HTML error
page named .gguf reported present:true.
The three checks now live in one function, checkpoint_bytes_present(path, validator), and the
marker half in models/download_markers.{h,cpp} -- interrupted_download() names
.download_manifest.json and .partial nowhere else. Both sources and the store's complete()
call it, so no caller can hold a different opinion about the same bytes. The registry source
validates with the ops of the recipe in its SourcePlacement, which is why S4 came first.
The plan said to make complete() a loop over sources. That was tried and it is wrong:
adopt_extra_cache() asks complete() whether a row would be whole, and the row it asks has no
provenance yet -- the resolver reads a bare org/repo checkpoint as a registry checkpoint, the
registry source looks only in the managed cache, and a model whose bytes sit complete in the
extra models directory is refused adoption and then loses its resolved path too, because
compose only resolves rows it believes are downloaded. The store decides which path a
checkpoint resolves to -- adopted caches, shard families resolved to the one file the engine
opens -- so the authority is a function over that path. Asking a source derives the location a
second time from provenance, which is the second opinion this step exists to remove.
Finding, from failing to see the bug first: checkpoint_status reports present:false with no
reason when a source cannot even be built, and the wire carries no reason field. Every
registry case in test_model_download_state was therefore false/false -- agreeing, vacuously.
A bare ModelManager wires no default model source, so no registry source can be built for an
org/repo checkpoint; production always does (RuntimeConfig::default_model_source). Five test
binaries now share one helper that takes the name from parse_remote_registry_source("")
instead of repeating the literal.
The characterization test was wrong too, and the mutation caught it. It asserted the two
answers agreed; deleting the marker check from the helper then broke just one of three marker
cases, because with no markers both authorities wrongly answer present and still agree. Each
case now pins the absolute answer. Re-run: M-A trips all three, M-B (registry stops
validating) trips the .gguf-of-HTML case alone, M-C (optional checkpoints ignored) trips the
whisper side cache alone.
One divergence is left and now documented rather than hidden: a row that adopted an
extra-directory cache reads downloaded:true beside present:false, because the registry source
answers for the managed cache only. Both fixes cost something -- reading the extra roots from
the source risks writing refs/main into a directory lemonade does not own, and recording the
adoption on the row changes the source the API reports and which rows the update scan visits.
That is a step of its own, not a smuggled-in extra.
cpp-ci 119/119, cli2 73 OK, endpoints 178 OK, whisper 12 OK, app regression 136, generators
--check, comment gate 0.
* S6: invalidation invalidates; it does not rebuild or publish
The write path published twice for every model change. `Write` publishes in its destructor,
and `invalidate_cache()` published a draft that is only a copy of what is already published --
so an invalidation announced a snapshot that says nothing changed, and the rebuild that follows
announces the change. Deleting the publish from the invalidation is the whole step, and it
needs the flag write to take the writer lock, since a reader can now hold the shared lock for
the whole read instead of a copy.
`invalidate_models_cache()`, `catalog_set_changed()`, the `DirectoryWatcher` callback and
`deps.persist_size` -- "content changed" and "the cache might be stale", the two ways a model
write used to end -- point at `ModelStore::invalidate()`. `persist_size` takes the size off the
published snapshot rather than opening a write to get a draft. `StoreWrite` scopes in the
facade 7 -> 3: two options patches and the download self-heal S7 renames. Live, one touch in
the extra models directory produces exactly one `Cache built`, and a burst of two produces one.
`test_generation_survives_a_rebuild` asserted the opposite -- "invalidating publishes, so a
lock-free reader sees it" -- which was the intended behavior written as a test of the old one.
It is replaced by `test_invalidation_publishes_nothing` in the store, and the notifier gains
`test_invalidation_marks_stale_without_publishing` and `test_an_invalidation_announces_nothing`.
Two things the plan had wrong: `Write::invalidate_cache()` has four callers left, not two; and
`StoreSnapshot::valid` is copied from `cache_valid_` at publish, so an invalidated store still
hands out a snapshot reading `valid: true`. Safe while `patch_download` is its only reader --
that path is guarded by `Write::cache_valid()` -- and worth reconciling if S7 touches either.
Verification: ctest -L cpp-ci 119/119; the comment gate is clean; both doc generators
report no drift; endpoints 178 tests OK (3 skipped) and whisper 12 OK (2 skipped). cli2 stops
at `test_092`, which fails the same way with this commit stashed and passes when run alone:
its shared repository is also `USER_MODEL_TE_CHECKPOINT`'s, and earlier cli2 tests register and
download the model that claims it. A fixture collision, not a delete regression.
* tests: the dummy model's text encoder gets a repository of its own
`test_092_delete_preserves_cross_repo_dependency` asserts the shared repository
directory is gone once the last model that uses it is deleted. `user.Dummy-Model`,
registered and pulled by earlier tests in the same persistent suite, resolved its
text encoder inside that same repository, so the delete correctly kept the bytes and
the assertion failed. The fixture already warns about this in two comments -- "only
holds while nothing else claims it" -- and the rule is stated for the main checkpoint
but was never applied to the text encoder.
Moved to a ~11 MB quant of `mradermacher/Tiny-LLM-GGUF`, a repository no other fixture
touches. Both consumers of the constant compare the checkpoint string, so nothing else
changes.
Why it hid: the repository held an unclaimed orphan file, and deleting a model whose
bytes nobody else claims removes the directory over it. Once the cache was cleared and
the suite re-downloaded Dummy-Model through the server, the ownership claim was written
and the collision became visible.
Verification: cli2 73 OK (2 skipped) -- previously 40 run, failfast at test_092 -- and
endpoints 178 OK (3 skipped), which exercises the constant in both directions.
* S7: the store answers reads, so collaborators stop reaching back into the facade
ModelStore took the read side the spec assigns it -- current(), resolve, exists, info,
resolve_name, public_name_for, rejection_reason, supported_models(), downloaded_models(),
resolved_paths_for, is_downloaded -- plus the one AliasManager resolution needs and the
composer its owner installs, because composing reads catalogs, registries, the machine
probe and saved options and none of that belongs to the store. A store with no composer
answers from what it published and never builds, which is what a test that patches rows
directly wants; the eleven sites that default-constructed one now name an in-memory
AliasManager.
ModelIngest::Deps lost seven read lambdas and three signal ones: models_changed and
model_updated became one ModelChangeNotifier*, persist_size moved into ingest (it needed
only the registries and the store it already held), and SyncService::Deps lost three and
gained a ModelStore*. Fields across the deps and hooks bags: 41 -> 27. make_ingest_deps()
is 34 lines, then 13. The facade's read verbs are one-line delegations; the file went
1096 lines -> 904 and its header 87 declarations -> 85, with both ceilings tightened.
wait_for_sync() was dead with no caller anywhere and is gone, and
remove_model_from_cache() -- a wrapper for one store call -- is inlined into the delete.
Three things the plan prescribed are not what shipped, and the spec now says why.
exists_unfiltered is not a store verb: it asks the registries about rows the host filter
removed, so the published set cannot answer it, and ModelIngest computes it from the
RegistryDocuments it holds -- a store method would be a second registry reader for one
caller. resolved_paths_for moved to ModelStore rather than ModelArtifactStore, because it
reads one published row's recorded paths, which is a snapshot question; the plan called it
the opposite. info() throws for a name nothing answers, since that is the contract the
facade's get_model_info has always had and every caller depended on; the nullable question
is read()->find(), and rule 6's wording distinguishes them.
A pinned contract caught a regression mid-step. Delegating resolved_paths_for through
current() turned a pure read into a compose-path call, which queues behind an in-flight
patch, and "a read answers while a writer holds the store" failed. Which verbs ensure and
which never wait is now written in the header, in the spec, and in that test.
Moving the self-heal changed behavior. The facade corrected a missing-bytes row with a
hand-rolled write that flipped that one row; the store verb routes through patch_download,
which also settles the collections routing through the model. A collection whose
component's bytes vanished no longer reports itself downloaded. Nothing pinned the old
narrow behavior, so this is a change to notice rather than one to assume.
Mutation checks. Dropping the alias fallback from ModelStore::resolve fails
NameResolutionTest, which covers the six steps end to end. test_model_alias does not catch
it and cannot: it exercises AliasManager alone, which is the point of the spec's rule that
aliases are consulted at resolution time and never folded into the snapshot. Dropping the
exists guard in ingest's pull fails PullRegistryTest, not the endpoints test_000a the plan
predicted.
Verification: ctest -L cpp-ci 119/119 after touching every source and rebuilding; app
regression 136 passed; both doc generators report no drift; the comment gate in CI form is
clean. Integration ran green against this code with comment-only edits still to come --
cli2 73 OK (2 skipped), whisper 12 OK (2 skipped), endpoints 178 OK (3 skipped) -- and the
repeat of that battery could not finish: this machine lost network egress partway (server
log full of "Could not resolve hostname", curl to huggingface.co returning 000), and the
one cli2 failure, test_044's config set, followed test_043 rebinding the listen host.
Re-run cli2, whisper and endpoints before relying on this commit end to end.
* S8: no header includes the facade header
A header that includes model_manager.h hands the whole models layer to
everyone behind it. Three of them did — backend_manager.h, wrapped_server.h
and backends/backend_ops.h, each included by 53-58 files — so editing the
facade recompiled 75 of the tree's product files. It now reaches 22, all of
them translation units that call it.
model_manager_types.h declares ModelManager and ModelInfo for the headers
that name the orchestrator without calling it; the alternative, writing the
pair out in each header, duplicates the struct/class kind MSVC warns about
and buys ~1 TU per header where the fan-out is small. Headers that read
models facts name the leaf for each fact instead: download_progress.h,
model_info.h, registry_types.h, artifact_fetch.h.
FacadeShapeTest now ratchets transitive reach rather than the direct-include
count, which a cosmetic edit could satisfy, and fails if any header includes
the facade at all. allowed_reexporters is compared as a set — it was failing
on ordering, not membership. download_progress.h joins the public read side.
Verified: cpp-ci 119/119, cli2 73 OK, endpoints 178 OK, whisper 12 OK, app
regression 136 passed, both doc generators --check clean.
* S9a: three facade helpers stop being public
forget_registered_model, save_model_options and start_directory_watcher were public, and every
product call to them comes from inside model_manager.cpp. The two tests that drove
save_model_options drive the public replace_options verb, which performs the same file-plus-cache
write, so no seam is lost by closing them.
download_from_huggingface_engine has no caller in the tree and stays: its comment says it is a
source-compatibility alias for integrations built against the original API, and an in-repo scan
cannot see those callers.
StoreWrite stays public for one reason - test_model_manager_shim holds a writer while a reader
runs, and with no read-only accessor for the facade's ModelStore that is the only way to express
the test. The comment names the blocker: give ModelManager a const store() seam and re-home the
writer hold, and the token becomes private.
FacadeShapeTest's direct-includer ceiling drops to its honest value of 22, so an added includer
fails instead of being absorbed by slack. cpp-ci 119/119.
* An invalidation landing mid-compose is no longer silently discarded
S6 moved invalidation off the write path: invalidate() takes the writer lock, clears
cache_valid_, and publishes nothing. That removed the only signal a compose in flight had.
Build::commit() refused a candidate by comparing generation_, which an invalidation no longer
moves, so a compose racing a persist would land a set built from catalogs enumerated before
that persist and set cache_valid_ = true on top of it. The stale set was then current: the
model that just finished downloading stayed missing until something else invalidated.
An invalidation now bumps invalidations_, a counter no client watches, and Build records it
beside the generation. Bumping generation itself was rejected: it is the signal that a set was
published, and an invalidation publishes nothing.
ComposeRetryTest caught this by accident. It had been simulating the racing writer with a raw
StoreWrite, whose destructor publishes, so it exercised the pre-S6 mechanism and passed; pointed
at the verb product code actually calls, it failed. test_store now pins the same case one level
down, where the store owns the race.
Also in this commit, the rest of S9b:
- ModelManager gains const store(), the read seam. A write scope needs a non-const ModelStore,
so no caller of it can hold the facade's writer, which is what let StoreWrite go private.
- The reader-not-blocked-by-a-writer check moves from test_model_manager_shim to test_store,
where the store is the thing under test; the shim test no longer needs write access.
- FacadeShapeTest gains "only the models layer and the facade open a store write scope": ingest,
cloud_rows and update_scan write, gateways and backends cannot.
cpp-ci 119/119, cli2 73 OK, endpoints 178 OK.
* S9c: four facade verbs with no product caller go away
generation(), all_models(), has_alias() and checkpoints_complete() were one-line pass-throughs
that nothing in the product called. The store already answers the first two through the read
seam added last commit, so the tests now say manager.store().generation() and
store().read()->models -- which is also what the read migration will leave the gateways saying.
checkpoints_complete() asked ModelArtifactStore::complete() about a row, and the thirteen tests
that used it were handing it rows that are not in any store. complete() needs nothing from the
manager but the row, so test_model_download_state now holds its own artifact store: the checks
are about a row and the bytes on disk, and that is the pair they name.
has_alias() turned out to have no callers at all - the three hits the caller census counted are
AliasManager's own method, called on an AliasManager. A receiver type is part of a caller count.
FacadeShapeTest's budgets re-struck to their honest values: 86 -> 82 header declarations,
904 -> 889 lines. cpp-ci 119/119.
* S9c: resolved_paths_for leaves the facade
Nothing in the product called it. The two callers the caller census counted are inside ingest,
where they already go to the store directly - the same receiver-type mistake as has_alias last
commit. The store's own version is const, so the shim test reads it off the store seam.
Budgets: 879 lines, 81 header declarations.
* spec: the facade's read verbs stay, and why
Plan item 2b said to delete the one-line read delegations once the store answered reads. That
cannot be done: a facade read composes, composing publishes, and publishing takes the writer. A
ModelStore& handed to server.cpp to save a delegation is a store write scope waiting to happen in
a file that has no business holding one.
Rule 6b records the shape that is actually safe: the read verbs stay on the facade, and
ModelManager::store() is const, offering only what answers from the published snapshot without
waiting on a writer - read(), generation(), descriptors(), resolved_paths_for().
* spec: the facade sketch becomes the shipped surface
The sketch ended its alias group in "..." and stood for thirty-five verbs that ship. It now lists
them, grouped by what they are asked for, and the name-set diff between header and sketch is
empty in both directions.
Two corrections it forced. wait_for_sync() never shipped - the verb is wait_until_sync_idle().
resolve_model_name() was missing from the reads group. download_from_huggingface_engine() is
written down with the reason it survives an empty caller list: source compatibility for
integrations built against the original API, whose callers this repo cannot see.
* S10: the resolver mints refs and opens every repository
Pull and update scan each re-implemented selection: assembling ArtifactRefs from checkpoint
strings, filtering the lazy checkpoints, parsing repo_id and variant. Three copies of rules that
decide what a pull downloads, each able to drift from the others.
ArtifactSourceResolver gains refs_for(info) and repository_for(ref, placement).
download_from_registry takes both; the update scan, hf_variants' pull listing and
search_registry take repository_for. ingest and update_scan lose their repository_for Deps
lambda: the injected host now reaches them through the resolver's hook, which is where
ModelManager wires ModelManagerConfig::repository_for, so a stubbed pull stubs one thing.
The facade builds one resolver at construction. It used to build hooks and a resolver inside
every source_for() call, which is once per checkpoint.
FacadeShapeTest now refuses `create_repository(` anywhere but the resolver, the factory that
declares it, and the facade's one wiring line. That is "one site binds a checkpoint to a source"
taken literally.
Two divergences are deliberate and now written into spec rule 7: the pull keeps its own list() +
registry_download_plan() rather than acquisition() (one listing serves three decisions), and the
update check keeps group_aux_checkpoint_variants because a malformed auxiliary checkpoint is
skipped silently by a check and refused loudly by a pull.
test_update_scan had been reaching the real factory through an unset seam and relying on it to
throw; it now installs a stub that answers "can go stale" and fails on the tree, which is the
shape it was always pretending to test.
cpp-ci 119/119, cli2 73 OK, whisper 12 OK, endpoints 178 OK; /pull/variants returns 12 variants
for a live repo through the new seam.
* S11 (part): fold checkpoint_grammar and definition_labels into the headers that own them
checkpoint_grammar was two functions parsing a ref's own parts; they now sit with ArtifactRef,
which is what the grammar describes. definition_labels was row policy -- the label set a
registration derives -- and json_catalog is where a row is parsed, so it moved there and took its
backend-descriptor include with it. Two .cpp link units gone, two headers fewer.
The other six candidates in the S11 table do not survive the step's own rule, and each reason is
now written next to the row it refutes:
- catalog_fetch_clock: four owners (catalog_set deps, configured_catalog, model_manager member,
the locator), not "its only user". Folding into any one makes three peers depend on a sibling
for a type all four share.
- registry_documents: holds a mutex and publishes immutable snapshots. The step excludes anything
with a mutex, and this row contradicts that.
- routing_parse_options: three parse sites build their tiers differently; that is the point of it.
No host owns the concept.
- recipe_option_layers -> recipe_options_store.h: the store is one rung of the ladder the folder
builds. Making the rung own the ladder inverts it, and the store has three mutexes.
- fetchable_repository.cpp -> registry_id.cpp: the registration table maps ids to repository
factories. Inside registry_id.cpp the id type would depend on every repository, which is the
dependency the factory exists to invert.
* S12: one StoreWrite binary for the store's write side; 3 CMake blocks become 1
test_store, test_store_build and test_store_patches all asked the same question of the same
object -- what a writer does to the published snapshot, and what a reader sees while it
happens -- so they are one process now, with each file's helpers kept in its own namespace
rather than renamed until they stopped colliding. 73 check() call sites in, 73 PASS lines out.
StorePatchesTest was listed here as "targets a class deleted in P4a". It does not: it exercises
patch_download and patch_removed, both live, so it merged on its actual surface instead of being
deleted. Deleting it would have dropped five checks over store writes that nothing else covers.
StoreSnapshot stays separate. It is the read side, and merging a read-side binary into a
write-side one would leave a binary named for half of what it tests.
Also removes a third copy of the saved-options rationale; composition.h owns that sentence.
* S13a: repository bookkeeping leaves artifact_store.cpp into its own unit
A repository cache's snapshot pointer and its processed-model ledger were six methods at the end
of a 1176-line file, beside download cleanup that has nothing to do with either. They move to
repository_provenance.{h,cpp} and the class forwards, so callers are untouched. The store is now
1055 lines; the extracted rules are 171, and RegistryProvenanceTest already covered them without
needing a new fixture.
* S13b: collections leave ingest.cpp into their own unit
Fetching a manifest, registering the components it names, deciding whether a collection may be
registered at all, and refilling a slim entry from a cached manifest: four methods plus three
helpers that only they used, 469 lines out of a 1471-line file. They share one input — the
manifest — which is why they belong together and not spread across the ingest.
ModelIngest keeps its public validate_collection() and populate_from_cached_manifest() and
forwards, so no caller changed; register_components and resolve_from_manifest were already private
and are now the collection unit's. The back-pointer to the ingest is there because a collection
pulls its components through the same path a plain model does rather than owning a second copy of
the download code. The destructor moves out-of-line for the unique_ptr.
ingest.cpp is 1058 lines. cli2 73 OK, endpoints 178 OK, whisper 12 OK, both doc generators
current, ctest 117/117.
* S14 items 1 and 2: delegated delete gets its fixture; a mistyped config value stops emptying the model set
Two carried defects, both about absence.
Delegated delete had no fixture. The path is real -- flm's descriptor declares self_manages_downloads,
so its source answers Deletion::Kind::Delegate, ownership_of records the recipe, and remove_self_managed_model
does the removal -- but nothing pinned it, so nothing said which side of that chain a change had broken.
The new case registers an flm row, deletes it, and requires the request to reach the backend: with no flm
executable the delegate refuses, and the refusal is the evidence. A CacheDir branch completes silently and
looks like success, which is why mutating `kind == Delegate` to false now fails two checks instead of none.
It needs disable_model_filtering for the same reason test_model_delete_shared_repo.cpp does -- flm is a
system package the test host will not have, and filtering would drop the row before the delete reached it.
backend_string/bool/int/double read config_[section][key].get<T>() after checking only that the key exists.
config.json is hand-edited, so a value of the wrong type throws type_error.302 out of recipe detection,
where it is caught and logged -- leaving `recipes` absent, which the router reads as "no recipe is
available" and filters every model on the machine. One bad key cost the whole set. All four now read
through one lookup that treats absence and mismatch alike, so a mistyped value costs at most the setting
it holds. Pinned by feeding build_recipes_info a document whose llamacpp.backend is a number: before, the
test binary aborted with the exception; after, the table survives with the recipe in it.
Top-level keys were already validated at construction, so they are untouched -- this was specific to the
per-backend readers, which had no validation behind them.
ctest 117/117.
* S15 (part): budgets struck to what they measure, and printed where a shrink will show
Three of the five facade budgets sat exactly at their ceiling with nothing saying so, which is the
same drift the ceilings exist to catch -- one line added somewhere else would have failed for a
reason unrelated to the line. All five now read the measured value: 876 lines, 82 declarations,
19 members, 22 direct and 22 transitive includers. The closure equaling the direct count is not a
coincidence to tidy; it holds because no header propagates the facade, and that has its own check.
Adds one summary line to FacadeShapeTest's output listing each budget against its ceiling. A
ceiling only says "not worse"; without the measured number a shrink is invisible unless someone
goes looking, and the reason to notice a shrink is to tighten the ceiling before something backfills it.
Also records S14 item 3 as investigated-and-left rather than open. validate_checkpoint_file() was
offered as the hook that already answers "may this file complete this checkpoint", and it does not:
it returns "" for a non-.gguf path, skipping magic-number validation rather than rejecting the file,
so routing the three literals through it refuses models that load today. Each site is written up
where the next reader will look instead of reopening the question.
* S15: the store's forwarding declarations point at the provenance rules instead of restating them
Splitting a unit copies its doc comments along with its signatures, and six of them ended up
describing the same behavior twice -- once where it is decided, once where it is forwarded. A pair
like that goes stale on the first change to either side. The header keeps one line saying what the
group is and where the rules live; the parameter note stays only where the default is not visible.
* S15: one sentence describes the provenance group, at its own header
The forwarding block restated in different words what repository_provenance.h already says about
the same five functions. A pointer is enough from a file that decides nothing.
* S15: registry_source_of moves to the header that owns registry names
It normalized ModelInfo::registry_source from artifact_store.h, where it sat beside the cache layout
it has nothing to do with. It is now declared next to parse_remote_registry_source() and
remote_registry_source_name(), the two calls it composes, and defined in the same file as them. The row type
does not take on registry parsing to get this: the function takes a row, which keeps the dependency one-way.
Ten call sites dropped their models:: qualifier, since lemon::models sees lemon:: by lookup -- the
qualified spellings were only ever correct because the declaration happened to be in the models layer.
Resolves the question S7 left open about this function's home. ctest 117/117, facade budgets unchanged.
* review: a store snapshot lives as long as the loop that reads it
* review: an NPU cache already on disk is not fetched again by an auto-load
* review: a planned name cannot place bytes outside its own directory
* review: load_optional_json looks for the UTF-8 path it was given
* review: the POSIX safe_* answer instead of throwing
* review: the snapshot golden compares one separator, not the native one
* review: the re-exporter diff compares the lists it prints
* review: the reader threads run before the writer stops them
* review: a re-pull proves it wrote no bytes; the empty if goes
* docs: a Hugging Face snapshot directory is the commit SHA
* gate: the directory-settings needles move with discovery into ScanCatalog
* build: test_auto_tune links json, and the gate asks reachability not naming
* models: a row borrowed from a published set outlives it; find() aliases the set
* api: checkpoint_status[].path is opt-in with ?include_paths=true
* aliases: a save holds the lock from snapshot through rename
* paths: one grammar for a component, and no writing through a symlink
* models: a delegate's checkpoint answers with the row's own fact
* comments: cut the essays this branch wrote
* comments: drop a same-pattern pointer in the collection ingest
* docs: the include_paths link names the heading that exists
* pull: a snapshot id the layout refuses throws instead of planning nothing
* transfer: a file name passes the grammar, not only containment
* docs: the spec names the consumers that exist after the merge
The merge moved every caller into route classes, so the spec's file names and its claim that the model-object field list is hand-kept both went stale in the same change. Records the merge in the plan: what moved where, the three silent losses the port recovered, the ceilings re-struck to measurement, and which suites did not run here.
* store: a collection's state settles under the writer lock
Two components of one collection finishing at once each computed the dependent
collection states from the set they had read, so each saw the other still
absent and both published the collection as not here with everything
installed. The recompute is a scan over rows and touches no filesystem, so
moving it inside the Write scope costs nothing it could not pay under a lock,
and the draft it reads is the one this writer just patched. A component the
draft no longer holds counts as absent rather than as just landed, so a delete
landing between the read and the commit cannot complete a collection on a row
that is gone.
The test starts both writers at once and repeats the round, because the window
they must both be inside is filesystem work wide: it fails on the ordering this
replaces and passes on this one.
* allow deleting models with all checkpoints shared
* relax symlink rules when they are within the repo
* address review comments
* address review feedback
* reduce test footprint
* fix shared-repository deletion with HF symlinks
* restore resume validation
* fix resume via proxy
* fix regressions
* address more review comments
---------
Co-authored-by: fl0rianr <[email protected]>
|
||
|
|
04d6f0ff03 |
fix(server): report unavailable ttft/tps as null when the backend reports no timing (#3955)
Related to #3947, alternative for #3808. OpenAI-compatible cloud upstreams report no timing fields, so the extracted ttft/tps is 0.0 (indistinguishable from an absent field) and the per-model gauges and /v1/stats sat at false zeros after every non-streaming request. Render the last-value timing fields as JSON null in Telemetry::to_json() when they hold a non-positive (i.e. unmeasured) value — the same convention cache_tokens already uses in that function. The update logic is unchanged; the per-model gauges sample from the JSON, so unmeasured requests emit no sample and the series goes stale in Prometheus. Unit tests for the to_json() null rendering in test_telemetry_helpers.cpp; /v1/stats field notes, response-schema descriptions and the two gauge HELP strings updated. |
||
|
|
882bc7a6e4 |
fix(bench): select context size per scenario (#3942)
* fix(bench): select context size per scenario * fix(bench): refine context selection |
||
|
|
9a9d43abc6 |
Fully refactor the HTTP server: route classes, core components, generated API docs (#3771)
* docs: add the server architecture spec Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): unpack multipart forms before ModelRoute resolves the model Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): require model on ModelRoute unless the route defaults to the loaded model Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): drop the startup shadow check in favor of per-folder registration order Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): keep WebSocketServer out of ServerContext since config changes replace it Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): declare each route's responses and request format - RouteSpec::responses lists every format a route returns, with an inline JSON Schema and a recorded example for each; streaming is part of the format - RequestFormat replaces the json_body and form_body flags - Model name resolution is left to ModelManager Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): rename the server architecture spec to HTTP Server Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs(spec): fix four gaps found while implementing the HTTP server spec - Require model on every ModelRoute; drop model_defaults_to_loaded, since the Router has rejected a missing model since multi-model support landed. - Keep images/upscale on ApiRoute, since it runs its upscaler as a one-shot CLI. - Add RouteSpec::experimental and a Partial support level so the existing docs badges survive generation. - Shorten long strings and arrays in recorded examples, and redact the harness cache directory and home directory. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec the generated docs in main's API reference layout Routes render as Parameters, Example request and Response format, with Field Descriptions built from ordered_json response schemas. Summary tables gain Modality and Status columns and keep hand-written rows. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Trim the spec's docs changes to what the layout requires Keeps the ordered_json types, the modality and summary rules, and the new route layout. Drops the field description rules, the tab label table and the key order rule, and restores the original Complete Example, shown in the new layout. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Revert spec edits the docs layout does not require Restores the approved text everywhere except where it described the old Response subsections and Schema tabs. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: let a route record several examples per response format (#3843) RouteResponse keeps only the format and schema. A new RouteExample carries each example's name, format, args and setup, and a setup ExampleStep either runs another route's named example or sends an unpublished request. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * Implement the HTTP server spec: route classes, core components, generated API docs server.cpp becomes a composition root. Every endpoint is one route class under routes/<page>/<section>/, registered by its folder's routes.cpp; HttpListener, RequestMiddleware, RouteRegistry, ConfigEffects and WebUi own the shared machinery, and ModelLoader, ModelJson, DownloadManager, JobOps and the gateway and Omni services hold what several routes share. ModelRoute runs the common resolve, validate, load and run pipeline. docs/api is generated from the routes' RouteSpecs by gen_api_boilerplate.py, with real request and response examples recorded in docs/tools/api_examples_cache.json. Docs And Style runs --check, and the weekly backend-bump workflows re-record the examples a new pin invalidates. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Ship the routing decision schema in the MSI and embeddable archive Route registration reads resources/schemas/decision.schema.json, so every package that lists its resources by hand must include it; the embeddable smoke checks now require it. The registry search app test now finds the route in its route file. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Drop model_defaults_to_loaded: every ModelRoute requires a model The Router already rejects a request with no model, so the flag only kept the four text routes' older error text. They now answer the same 400 as every other model route. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Port main's image edit and backend label changes into the route classes - images/edits accepts several image[] references, rejects mixing image and image[], and infers an omitted size from the first reference, capped by the model's image_defaults.soft_pixel_cap. - ModelJson reports image_defaults.soft_pixel_cap. - The system-info schema adds each backend's tier and format and each recipe's experimental flag; the Backend Tiers and Formats section moves over as a hand-written section, and the experimental model label row is dropped. - Re-record the system-info example, which predates tier and format. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Keep main's API docs wording and layout in the generated pages The generated docs now follow main's API reference layout: Parameters, Example request, then Response format with a Field Descriptions list built from the response schemas, which are ordered_json so fields keep their written order. Route text, examples and hand-written sections use main's wording, with small edits only where main's text no longer matches the code. Summary tables keep main's columns and rows: a Modality column from the new RouteSpec::modality, a Status column on pages with unsupported routes, and hand-written rows the generator keeps for the WebSocket endpoints and the llama.cpp slot actions. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Port main's per-GPU metrics into the route classes - system-stats reports primary_gpu_id and a gpus list, and gpu_percent and vram_gb come from the primary GPU. The route and the job engine's system_stats op now build the reading in one place, services/system_stats. - The Prometheus metrics route reads the primary GPU the same way. - The system-stats schema documents the new fields, and main's GPU notes move over as a hand-written section. - Re-record the system-stats example, and the examples whose llama.cpp ROCm and sd-cpp pins main bumped. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Trim comments to the ones that explain a why Drop comments that restate the code, name their callers, or say what the code does not do, and shorten the rest to their one non-obvious reason. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Re-record the stale /internal/config example and guard against recurrences The internal.config example was recorded before #3775, when lemond still merged /usr/share/lemonade/defaults.json from an older installed package, so it carried openmoss.rocm_bin from before #3615. The cache key cannot see lemond's own defaults, so the entry was never re-recorded and --check passed. - Re-record internal.config; it now matches internal.config_defaults. - Compare the recorded internal.config and internal.config_defaults with the fresh lemond the generator already starts: --check fails on a mismatch, and a normal run re-records the entry. - Strip LEMONADE_DEFAULTS_PATH and LEMONADE_ALLOWED_ORIGINS from the harness lemond's environment so the recording machine's settings cannot seed its config. - Drop the OpenMOSS ROCm usage line from server_tts_openmoss.py. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UGEQsXh31AhYdQ8C8Cjup4 * Revert the generator and test changes from the stale-example fix Keeps only the re-recorded internal.config example. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UGEQsXh31AhYdQ8C8Cjup4 * Make docs/api/internal.md the one reference for the internal endpoints - getting-started.md drops its Internal Endpoints section. Its remote-access note and non-loopback warning move into internal.md's intro, and its simulate-vram-pressure behavior into that route's notes. - runtime.md keeps a table of the settings and shutdown endpoints an embedding app uses, each linking to internal.md. - internal.md states which apps may use these endpoints, and the hand-written lines that repeated the generated sections are gone; the alias delete 404 moves into the route's notes. - Guide mentions of internal endpoints link to internal.md. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Move hand-written API docs into the route specs The hand-written text between generated regions either repeated the generated sections or described a single route. Repeats are deleted, and route facts (error statuses, behavior notes, examples that cannot be recorded, and concept sections such as Backend Tiers and Server-side Tools) move into each route's notes, keeping their anchors. What remains hand-written is page intros, the WebSocket APIs, Model Labels, the routing overview, MCP's shared tool behavior, and examples a single recorded request cannot show. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Let a route record several examples per response format RouteResponse keeps only a format and its schema. Each route lists its examples in RouteSpec::examples, each with a name, the format its reply is validated against, its args and its setup. A setup step runs another route's named example, or sends an unpublished request. Cache keys hash a named step the way they hashed the response it replaced, so every existing recording stays valid, and example names reproduce the tab labels the generator used to derive from formats. The slots save and restore examples and the ACE-Step vocals example are now recorded instead of hand-written. The docs harness runs lemond in its temporary cache dir, so llama.cpp's relative --slot-save-path writes there. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Tighten every route's docs and keep main's page order Route descriptions, notes, argument and field descriptions no longer repeat the generated URL, alias and auth line, the page intro, the parameter table or each other, and statements that disagreed now match the code. lemonade.md and openai.md list their routes in main's order, and each page's summary table follows its section order. A field list renders once when a route's examples share a format, /v1/load's example is a plain load, and the slots examples load with --slot-save-path and save a chat capped by max_tokens, so save and restore report the same token count. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Fix what a final read of the rendered API pages turned up - False claims: /health's --websocket-port flag (it is the websocket_port setting), /health's max_models missing classification, images/generations' n limited to 1, chat's max_tokens being exclusive with max_completion_tokens, route ids being docs anchors, and install registering only OpenAI-compatible providers. - Repeats: Ollama's unload notes, MCP's shared tool behavior, the 501 in unsupported routes' summaries, the image options in Ollama generate's options row. - Rendering: placeholders like <PROVIDER> and <recipe> are now in backticks, so Markdown no longer hides them. - Wording: the routing decision description, sync status fields, summary styles, heading case, and em dashes in Model Labels and MCP tool text. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Fix the last issues from the final read of the API pages Chat's logprobs is honored (a llama.cpp chat returns choices[].logprobs), so its row is available again. Ollama pull's status values are in backticks so <file> renders, MCP tool descriptions name their default model only in the model row, and the cloud provider headings use title case. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Regenerate the API and MCP docs after syncing with main Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Keep decision.schema.json unchanged; describe x_lemonade_route at the field decision.schema.json is under the frozen-major schema lock, so the completion routes take their field description from route_decision_field_schema() instead of editing the schema. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec a contract for route docs and lint it in the drift check Each RouteSpec text field gets one job, URLs use only the /v1/ form, and the drift check fails on the patterns that made the generated pages repeat themselves. The generator documents a Quad route only at /v1/. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Apply the route docs contract to every route and lint it gen_api_boilerplate.py --check now lints route text against the spec's Route Documentation Contract: phrases the generator prints, prefixes other than /v1/, em dashes, placeholders outside backticks, long summaries and descriptions, and sentences repeated within a route's region. The generator documents a Quad route only at /v1/, listing aliases in that form, and every route's text was revised to the contract, correcting the claims that disagreed with the code. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Fix the last contract issues a full read of the pages found /health's update_check_done and the models page's cloud note now match the code (registry-agnostic update check; anthropic-wire providers serve only /v1/messages). Field descriptions no longer state types, values and lemond are in backticks, headings use title case, and /internal/set's rows say "Defaults to". Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Contract: who-uses only when not obvious; arguments may state conditional requirements Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Fix every route the per-route contract audit flagged An evidence-backed checklist audit of all 85 routes found 71 rule failures and 33 false claims; each fix was verified against the handler code and re-audited until every route passed. Notable corrections: attach_if_running was described backwards; Ollama chat's think and the Ollama/Anthropic gateways' alias handling are documented as they actually behave; image defaults come from each model before the server-wide fallback; system-info no longer documents fields nothing sets. The generator now prefers a described field when response shapes share a name. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Pin the sampling of the chat that the slots save example runs Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: close docs-generation gaps found reviewing the generated pages (#3848) * Spec: close the docs-generation gaps found reviewing the generated pages - Field Descriptions print a schema's own description, list each shape of a multi-shape format separately, and list shared schemas in full. - The contract gains a row for schema-level descriptions. - Each example runs against a freshly started lemond. - Arrays of objects and data-keyed maps show their first 3 entries, and lemond's version is recorded as <version>. - Examples built from lemond's own docs or route specs are recorded live. - docs/api/README.md states how clients send the API keys. - Drift Check fails on a shape with no example, an undescribed recorded field, a recorded JSON body over 100 lines, or a live example that loads a model. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0155DTqmffuXR2U3rhsFnb28 * Spec: drop live examples; recorded values may drift, only the shape must hold Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0155DTqmffuXR2U3rhsFnb28 * Spec: name RouteResponse::schema instead of an undefined 'schema' Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0155DTqmffuXR2U3rhsFnb28 * Spec: add a claim review step for route docs Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0155DTqmffuXR2U3rhsFnb28 --------- Co-authored-by: Claude <[email protected]> * Generate docs per the updated spec: shapes, top-level descriptions, shortened lists, new checks - Field Descriptions print the top-level description of a RouteResponse::schema, list each oneOf shape under its own description, and list $id schemas in full. - Arrays of objects and maps keyed by data show their first 3 entries in the page. - Drift Check fails on a format or shape with no example, a recorded field with no description, and a recorded JSON body over 100 lines in the page. - docs/api/README.md says how clients send the API keys. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0155DTqmffuXR2U3rhsFnb28 * Drop all src/app changes from this PR Removes the Playwright test-results output committed by accident and restores tauriShim.ts to the base branch. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RrqRFa7Zrr517fcQb3ePKX * Regenerate API docs with shapes, top-level descriptions and shortened lists; treat a described top-level schema without properties as opaque Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0155DTqmffuXR2U3rhsFnb28 * Describe every recorded field of the OpenAI text and image responses Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0155DTqmffuXR2U3rhsFnb28 * Describe model, load, download and classify responses; add pull, load and download-control examples for every shape Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0155DTqmffuXR2U3rhsFnb28 * Describe every recorded field of the remaining routes; add install and uninstall examples for every shape Config routes model config.json as a map of settings. Examples that a renamed setup step names now point at their new names. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0155DTqmffuXR2U3rhsFnb28 * Spec: drop validate_args, which no route needs Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RrqRFa7Zrr517fcQb3ePKX * Show the first entry of arrays of objects and data-keyed maps, so system-info fits the page limit Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0155DTqmffuXR2U3rhsFnb28 * Spec: show the first entry of arrays of objects and data-keyed maps Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0155DTqmffuXR2U3rhsFnb28 * Remove validate_args: no route set it The validation path in ApiRoute::serve() never ran, so drop the field from the spec and RouteSpec, its /internal/routes output and schema, and the McpTool::validate() wrapper that only it called. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RrqRFa7Zrr517fcQb3ePKX * Record the missing examples; list each response shape in the tab whose response returns it Recorded lemonade.pull non-streaming, lemonade.load collection, lemonade.downloads_control remove, lemonade.install local and job, and lemonade.uninstall local. A route whose examples span several formats listed every shape of a format in each of its tabs, so two examples of one oneOf format repeated the whole list. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Fix every claim the per-route claim review found false or missing Each route's text was read beside its handler and the code it calls, and changed claims were checked against a running lemond. Notable fixes: routed responses always carry x_lemonade_route (route_trace only adds its trace); pull's update-check note; Anthropic warnings and 404/409; Ollama 404/409/500, options marked partial, generate's two done lines; load's merge_args, option layers and saved-option keys; error statuses on the text, image, options, jobs and internal routes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: a shape no recording machine can return names the reason in x-no-example Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Exempt install's manual-setup shape from the example requirement No recording machine runs a Strix Halo kernel without the CWSR fix, so the shape names that reason in x-no-example. Drift Check skips such a shape, and the format's first tab still lists its fields. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Regenerate internal.md after validate_args removal Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Test that model-optional classify keeps a routing helper's residency Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: ModelRoute skips the load when validate() picked a loaded model Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: describe the routing decision inline instead of reading decision.schema.json lemond never read decision.schema.json before; it is the routing engine's frozen contract. Routes now describe the decision with a short inline object that links to the router page, which links to the schema file. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Keep a routing helper's residency when classify fills in the model ClassifyRoute::validate() picks the sole loaded classifier, and ModelRoute then loaded it again with the default UserInference purpose, demoting a routing helper to a standard model. validate() now marks the model as already loaded and ModelRoute skips the load step. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Parse number form fields as double, as main did std::stof rejected values outside float range that main's std::stod accepted, such as a transcription temperature of 1e39. No test added. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Log models and system-info request lines again quiet_log dropped these routes from the access log entirely. Main logged their request line and left out only the response line, so they move back to the is_quiet_get list. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Log global_timeout and download_rate_limit only when they change Server::Server applied them through ConfigEffects, which logged them on every startup. It now calls the HttpClient setters directly, as main did, and the change log uses main's wording. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Restore which default model each MCP tool downloads Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Stop reading decision.schema.json at runtime The file is the routing engine's frozen contract, and lemond never read it before. x_lemonade_route and routing/validate's decision now use a short inline schema that links to the router page, which links to the schema file. This reverts the packaging added only for this file and restores main's source lists for the two decision tests. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Regenerate MCP reference docs Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: leave the web app's window.api mock out of WebUi's responsibilities Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Keep injecting the web app's window.api mock from WebUi Restores main's behavior: lemond inserts the mock into the web app's index.html, and the web-app build is unchanged from main. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Keep main's MCP tool descriptions Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: drop the routing-context and CPU-state lines the implementation no longer follows Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Drop the WebSocket server mutex main never had Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Fill routing/validate's context directly, as main does Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Keep background syncs and CPU-usage state in Server, as main does ModelManager and the platform metrics classes match main again. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Restore main's alias null checks, warmup guard and shutdown setter Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: give examples a description, and keep requests out of notes Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Record the chat and pull examples that notes hand-wrote Examples get a description, printed at the top of their response tab, and a fixture can follow a prefix such as a data URL. Chat's image and Omni requests and pull's register and collection requests are now recorded examples; their notes keep only the concepts. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: give each example its own subsection Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Give each API example its own subsection Each example's request tabs, response and description now sit together under its own heading, and each response format's Field Descriptions are listed once after the examples. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: let an example's description cover a request shape only it uses Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Move chat's image input note into its example Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: put the recorded status on the Response label Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Show each recorded status on its Response label Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: link the API pages instead of naming their paths Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: declare each route's errors so handlers and docs share one source (#3869) * Spec: declare each route's errors as RouteError values Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: reword the status-code compatibility note Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: declare route errors without changing the wire Replace the fail()/ErrorFormat draft with RouteError values that the existing writers take in place of a status. Move status changes to Appendix B. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: sync the errors example with the implementation Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: address review of the route errors section Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: list the missing-model 400 only for a required model Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: keep the route errors edit minimal Drop the argument-validation proposal from Appendix B and the mid-stream error event from the worked example, which the error design does not need. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: say plainly why each error declaration exists Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: drop the RouteError struct comment Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: drop comments that restate names Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: describe the error writers without reference to the old signatures Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: rewrite the Errors section in the spec's own style Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: routes list their base class's error responses explicitly Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: name the missing-model error instead of its step number Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: link the API reference instead of naming its path Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: validate request arguments in ApiRoute::serve() Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: serve() removes undeclared nulls; MCP may read its own body Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: Drift Check flags base-class errors a route can't get Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * Spec: serve() renames aliases, and the name wins Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: validate nested values; describe invalid_argument by what it checks Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: check Form args and range/length/pattern keywords; Anthropic errors carry code Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: head each response shape with its title; drop the Field Descriptions label Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Declare each route's errors as RouteError values (#3871) * Spec: declare each route's errors as RouteError values Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: reword the status-code compatibility note Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Add RouteError and convert core error writers to it Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Generate each route's Errors table and lint error statuses Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Declare every route's errors as RouteError values Each error status a route writes now comes from a RouteError listed in its spec, and the generated docs list them in an Errors table. Nothing changes on the wire. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: declare route errors without changing the wire Replace the fail()/ErrorFormat draft with RouteError values that the existing writers take in place of a status. Move status changes to Appendix B. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Fix route error declarations from review Correct inaccurate when texts and codes, document the race 404s the llamacpp routes pass through, drop a dead provider guard, keep error-shape facts the removed notes carried, describe stream error events, and add errors to the /internal/routes schema. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: sync the errors example with the implementation Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: address review of the route errors section Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Drop notes that restate the stream error event Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: list the missing-model 400 only for a required model Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * List the missing-model 400 only for routes that require a model Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: keep the route errors edit minimal Drop the argument-validation proposal from Appendix B and the mid-stream error event from the worked example, which the error design does not need. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: say plainly why each error declaration exists Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Say plainly why each error declaration exists Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: drop the RouteError struct comment Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Drop the RouteError struct comment Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: drop comments that restate names Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Drop comments that restate names; keep the base header's comments Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: describe the error writers without reference to the old signatures Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: rewrite the Errors section in the spec's own style Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: routes list their base class's error responses explicitly Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * List base-class error responses explicitly in each route Replace the registry's inherited-error merge and the paired error-list overrides with base-class constants that each route lists in spec(), and lint for them. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: name the missing-model error instead of its step number Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: link the API reference instead of naming its path Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: validate request arguments in ApiRoute::serve() Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Validate request arguments in ApiRoute::serve() Each Json/OptionalJson route's JsonBody and Query args are checked against their RouteArg before handle(), with aliases, forwarded args and a per-route ErrorFormat. Self-parsing Raw routes move to Json/OptionalJson and drop their hand-written checks. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: serve() removes undeclared nulls; MCP may read its own body Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Remove a null only when its argument's type excludes null Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Spec: Drift Check flags base-class errors a route can't get Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Rename aliases in serve() so handlers read only the argument's name Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Check nested argument values; drop route checks their schemas now cover Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Consolidate redundant route errors Shared checks now declare their errors once beside the function that writes them, catch-all 500s share ApiRoute::kUnexpectedException, Form args and range, length and pattern keywords are validated centrally, and Anthropic errors carry code. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Share kUnexpectedException for install, uninstall and unload catch-alls Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Share errors for malformed backend responses, unlisted fields and 3D failures Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Share one alias-store 500 across the alias routes Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Head each response shape with its title in the API docs Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> * Spec: compatibility with v2026.42 and prior; Ollama argument reading (#3896) Adds a Compatibility with v2026.42 and Prior subsection (public API, URL prefixes, older names, empty bodies, Ollama clients), the RouteArg drop_invalid flag, and the first-spelling-wins alias rule. Drops the quad-prefix invariant from AGENTS.md, since the compatibility section now covers which prefixes are served, and renumbers the disconnect invariant. Claude-Session: https://claude.ai/code/session_014JszCEzPFtJywaaGgq7rFu Co-authored-by: Claude <[email protected]> * Spec: drop drop_invalid; Lemonade extensions on Ollama routes are checked like any other argument Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014JszCEzPFtJywaaGgq7rFu * Spec: the alias rule only drops an empty spelling; trim the Ollama clients bullet Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014JszCEzPFtJywaaGgq7rFu * Ollama client-compatibility tests (#3886) * Spec: collect compatibility rules under "Compatibility with v2026.42 and Prior" The spec's Scope gets a subsection that lists what lemond keeps for clients built against v2026.42 and earlier: the public API, the /api/v0, /api/v1 and /v0 prefixes (still served for pre-existing endpoints, no longer documented; docs and examples use /v1 only), argument and path aliases, and OptionalJson's null body. The Prefixes table and the backend guide point there. AGENTS.md drops invariant 10 (quad-prefix registration); the disconnect invariant becomes 10, and the references to it follow. Two comments that cited invariant 11 for unrelated rules now cite the right one or none. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Test the Ollama gateway with the requests Ollama's clients send Ollama's Go client (and so the `ollama` CLI) always sends both "model" and "name" on show, pull and delete, leaving one empty, and Ollama reads cmp.Or(model, name). New tests send those exact bodies for `ollama run`, `ollama show`, `ollama pull` and `ollama rm`, plus think levels, a malformed ctx_size (a field Ollama does not define, so it ignores it), /api/embeddings' prompt next to an input, and options that are not an object. Tests that need no model use an unknown model name and expect its 404, so they fail when a request is rejected before the model lookup. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Move the spec and AGENTS.md edits to their own PR; drop invariant numbers from code The compatibility section and the invariant renumbering now land with the spec, so code comments no longer cite AGENTS.md invariants by number. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014JszCEzPFtJywaaGgq7rFu * Expect 400 for a malformed ctx_size on the Ollama routes Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014JszCEzPFtJywaaGgq7rFu * Drop the ctx_size and embeddings prompt/input tests Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014JszCEzPFtJywaaGgq7rFu * Keep only the tests that send the ollama CLI's requests to a loaded model Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014JszCEzPFtJywaaGgq7rFu * Ollama gateway: read model/name like Ollama, accept think levels (#3887) * Read an argument's spellings the way Ollama reads model and name ApiRoute::check_args now reads an argument sent under several spellings from the first one with a value, the name and then each alias, checks only that value, and drops the rest unchecked. An empty string is no value when another spelling has one. This is Ollama's cmp.Or(model, name): its Go client always sends both and leaves one empty, which the old rule rejected because every spelling was checked against minLength. RouteArg::drop_invalid ignores a value that fails its schema instead of answering 400, for fields a gateway's clients expect to be ignored. The spec's Argument Validation and Compatibility sections state both rules, and test_route_args covers them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Ollama routes: accept think levels and ignore malformed Lemonade extensions /api/chat's think takes a boolean or one of low, medium, high and max, the levels Ollama accepts for models without their own; other strings answer 400 as in Ollama. ctx_size on chat, generate, embed and embeddings, and generate's top-level width, height, steps, cfg_scale and seed, are Lemonade extensions that Ollama does not define, so a malformed value is ignored as Ollama ignores unknown fields. options keeps its object check, as in Ollama. /api/tags' size is documented as the measured size of the model's files. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Drop the route-argument C++ unit test Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014JszCEzPFtJywaaGgq7rFu * Drop drop_invalid: malformed Lemonade extensions on Ollama routes answer 400 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014JszCEzPFtJywaaGgq7rFu * Narrow the alias change to dropping an empty spelling; drop the /api/tags doc change Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_014JszCEzPFtJywaaGgq7rFu --------- Co-authored-by: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]> * Spec: name each route argument by its RouteArg constant (#3888) * Spec: collect compatibility rules under "Compatibility with v2026.42 and Prior" The spec's Scope gets a subsection that lists what lemond keeps for clients built against v2026.42 and earlier: the public API, the /api/v0, /api/v1 and /v0 prefixes (still served for pre-existing endpoints, no longer documented; docs and examples use /v1 only), argument and path aliases, and OptionalJson's null body. The Prefixes table and the backend guide point there. AGENTS.md drops invariant 10 (quad-prefix registration); the disconnect invariant becomes 10, and the references to it follow. Two comments that cited invariant 11 for unrelated rules now cite the right one or none. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Test the Ollama gateway with the requests Ollama's clients send Ollama's Go client (and so the `ollama` CLI) always sends both "model" and "name" on show, pull and delete, leaving one empty, and Ollama reads cmp.Or(model, name). New tests send those exact bodies for `ollama run`, `ollama show`, `ollama pull` and `ollama rm`, plus think levels, a malformed ctx_size (a field Ollama does not define, so it ignores it), /api/embeddings' prompt next to an input, and options that are not an object. Tests that need no model use an unknown model name and expect its 404, so they fail when a request is rejected before the model lookup. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Read an argument's spellings the way Ollama reads model and name ApiRoute::check_args now reads an argument sent under several spellings from the first one with a value, the name and then each alias, checks only that value, and drops the rest unchecked. An empty string is no value when another spelling has one. This is Ollama's cmp.Or(model, name): its Go client always sends both and leaves one empty, which the old rule rejected because every spelling was checked against minLength. RouteArg::drop_invalid ignores a value that fails its schema instead of answering 400, for fields a gateway's clients expect to be ignored. The spec's Argument Validation and Compatibility sections state both rules, and test_route_args covers them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Ollama routes: accept think levels and ignore malformed Lemonade extensions /api/chat's think takes a boolean or one of low, medium, high and max, the levels Ollama accepts for models without their own; other strings answer 400 as in Ollama. ctx_size on chat, generate, embed and embeddings, and generate's top-level width, height, steps, cfg_scale and seed, are Lemonade extensions that Ollama does not define, so a malformed value is ignored as Ollama ignores unknown fields. options keeps its object check, as in Ollama. /api/tags' size is documented as the measured size of the model's files. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Spec: name each argument by its RouteArg constant Each argument becomes a RouteArg constant beside its handler that spec() lists, as RouteErrors are. After serve() resolves aliases, route code reads and changes an argument only through its constant (req.has, req.value, req.arg, req.body[k.name]); query and path values are converted to the schema's type. ModelRoute reads the model through model_arg() and canonical_model_name(), which takes a name rather than a request body. The drift check fails a route file that names an argument by a string literal or reads a RouteArg its spec does not list. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Spec: write the RouteArg constant rules in the spec's style Move Reading arguments after the other serve() bullets, keep the Aliases sentence as it was, and give the argument example the same shape as the RouteError example. Word the ModelRoute step, the helper row and the drift check bullet like their neighbours. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Spec: state the shared-helper rule plainly Drop the comparison to RouteError and say directly which helpers receive values and which receive the body. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Spec: name another route's and shared arguments by constant A route that builds another route's request, as the gateways do, names that route's arguments through its constants, which openai_args.h declares for the OpenAI routes. An argument several routes take alike is one constant, such as ModelLoader::kCtxSize. The drift check flags a literal key on a built request. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Spec: keep arguments that several routes take alike in shared_args.h Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Spec: take the example's stream argument from common::kStream Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Spec: the drift check fails a RouteArg that duplicates another Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Spec: path parameter rules, distinct arguments, helper reads, tagged model names Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0181gVXYv16yiMWExUzzEmvN * Name every route argument by its RouteArg constant (#3890) * Name every route argument by its RouteArg constant Each route's arguments become file-scope RouteArg constants that spec() lists. Route code reads and changes an argument only through its constant, with new RouteRequest accessors: has(), arg(), value() and file(), and req.body[k.name] for a value the route forwards. serve() collects Query and Path arguments into req.params, converted to their schema types, and RouteRegistry rejects a route whose paths order their parameters differently or whose path pattern has its own capture group. ModelRoute reads the model through each route's model_arg(), and canonical_model_name() takes a name instead of a request body, so /unload strips :latest and follows model aliases whichever spelling the client used. Shared helpers that read arguments now take values: gateway_load_options(), respond_with_model_options() and the local backend recipe check. The drift check fails a route file that declares an argument inline, names an argument or alias by a string literal, or uses a RouteArg its args do not list. registry/search now declares `q` as an alias of `query`, which the generated docs list. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Name other routes' arguments and shared arguments by constant The gateways write the OpenAI requests they build through the target route's RouteArg constants, which openai_args.h declares and the OpenAI route files define: openai_req[openai::chat::kMessages.name]. The arguments chat/completions and completions take alike are one set of constants both list. map_ollama_options() maps Ollama option names onto those constants. ctx_size, which ModelRoute reads for every model route, is one ModelLoader::kCtxSize that the model routes list, and load_options() takes its value. The speech and audio format helpers take response_format, the image upload helper takes the route's image constant, map_ollama_options() takes Ollama's options, and the Omni helper reads stream through the chat constant. chat/completions and completions forward tool_choice, response_format, seed and frequency_penalty without declaring them; they are now declared as forwarded arguments, so the docs list them. rerank's ctx_size gains the sentence the other model routes carry. RouteArg moves to its own header so model_loader.h and openai_args.h can use it. The drift check flags a literal key on a request built for an OpenAI route, and resolves constants that route files list but do not define. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Keep each argument that several routes take alike in shared_args Arguments that several routes declared as separate, identical constants (the text routes' sampling arguments, the Ollama model and ctx_size arguments, the jobs and models path ids, the download stream arguments, and so on) are now one constant each in lemon/server/shared_args.h, which every route that takes the argument lists. Where the copies' descriptions differed only in wording, the shared constant keeps one wording, which the regenerated API docs show. ModelLoader::kCtxSize becomes model_loading::kCtxSize, and the openai::text constants and openai::chat::kTools move out of openai_args.h. The drift check now tells shared constants apart by namespace and flags a route that reads a shared constant it does not list. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Share stream, max_tokens and provider where routes take them alike The server-sent-events stream argument of the text routes and the download routes is one constant, common::kStream, and Ollama's /api/pull lists ollama::kStream with /api/chat and /api/generate. chat/completions and completions share openai::text::kMaxTokens; the precedence over max_completion_tokens is stated on max_completion_tokens, and map_ollama_options no longer takes the max_tokens argument. install and uninstall share backend_routes::kProvider. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Share model, steps, ctx_size, keep_alive and backend across routes Every route that loads its model on first use lists model_loading::kModel, or model_loading::kFormModel for a multipart form, in place of a per-route model argument whose description only named the kind of model. Ollama's /api/embed and /api/embeddings take gateway::kModel. Audio and image generation share inference::kSteps, /v1/load and /v1/models/{id}/options share model_options::kCtxSize, and Ollama's /api/chat and /api/generate share ollama::kKeepAlive. The install dry run lists backend_routes::kBackend, whose cloud value is now stated on provider. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Share model_name between /internal/pin and /v1/delete Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Share dry_run between /internal/models/sync and /v1/models/{id}/options How the options route's response reads after a dry run is stated in that route's notes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * Drift check: fail a RouteArg that duplicates another Two RouteArg constants with the same spellings (name and aliases, under any constant name), location, schema and flags fail the check, whatever their descriptions say, so a copy of a shared argument has to use the shared constant. A group whose routes treat the argument differently is listed in DISTINCT_ARGUMENTS with how they differ, and an entry that no longer matches fails too. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq * State that max_tokens wins over max_completion_tokens Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0181gVXYv16yiMWExUzzEmvN * Pass router_dispatch() the values it reads, and lint helpers that read arguments by name Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0181gVXYv16yiMWExUzzEmvN * Give uninstall its own provider argument: the installed provider to remove Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0181gVXYv16yiMWExUzzEmvN * Describe keep_alive's unload condition as an empty input Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0181gVXYv16yiMWExUzzEmvN * Keep :latest on a registered model name that ends in it Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0181gVXYv16yiMWExUzzEmvN --------- Co-authored-by: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]> * Fix the misleading docs and the null job name the #3771 audit flagged (#3897) - POST /jobs reads `name` from the checked body, so `"name": null` counts as absent and creates the job instead of answering 500 with no body. - max_completion_tokens: the backend picks when both limits are sent (llama.cpp uses max_tokens, vLLM max_completion_tokens). - models/{id}/files: an alias's id is not accepted. - install: name the cloud errors that carry an object; the rest carry a string. - pull: top-level mmproj is a filename in the checkpoint repository, and checkpoints.mmproj takes repository:filename. - simulate-vram-pressure: one evaluation unloads at most one model, the first past its idle timeout before any pressure candidate, and downsizes idle ones. - internal.md: the admin key alone leaves every non-internal endpoint open. Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq Co-authored-by: Claude <[email protected]> * Fix the five misleading docs statements the second audit found (#3902) - models/sync status: a sync other than a dry run that found no models to check finishes `idle`. - models/sync/status `sync_id`: a finished sync's answer is the status recorded when it finished, completed_sync_id and already_in_progress included. - chat/completions streaming `usage`: vLLM models always send the usage chunk. - chat/completions `tool_choice`: llama.cpp models treat the object form as `auto`, so the argument is Partial. - install: name every cloud check that answers an `error` object, including missing fields and an `http://` base URL without allow_insecure_http. Claude-Session: https://claude.ai/code/session_018UUSj8ww81MPozDgCc1Puq Co-authored-by: Claude <[email protected]> * Apply suggestion from @jeremyfowers * Apply batched suggestions from code review Co-authored-by: Jeremy Fowers <[email protected]> * Spec: name each route argument by its RouteArg constant Brings the spec changes from #3888, which merged into jfowers/http-server-refactor, onto the spec branch so that every spec change lives in the spec PR. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QCduCZnp6zXsBoSfy79Y7z * Spec: drift check fails an API page missing from the nav or the API reference table Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QCduCZnp6zXsBoSfy79Y7z * gen_api_boilerplate: fail when an API page is missing from the nav or the API reference table --check now fails when a page that has routes has no entry in the mkdocs.yml nav or no row in the page table in docs/api/README.md, or when either one lists a docs/api page that has no routes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QCduCZnp6zXsBoSfy79Y7z * Regenerate API docs for pull registry_unavailable error Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KsnZfUqJ2z9bTH2g2UK64K * Pull docs: only the SSE error event reports registry_unavailable Background download jobs (subscribe: false) still report a rate-limited registry as a generic error, as on main. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KsnZfUqJ2z9bTH2g2UK64K * Trim the main-merge port to the minimum the refactor requires Drop the pull note rewording and the download event schema additions; keep the registry_unavailable RouteError, which the route lint requires for the 503 the pull route now writes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01KsnZfUqJ2z9bTH2g2UK64K * Check query args on Raw routes; fix alias regex backtracking; narrow 405 docs - Raw routes now validate their query arguments against the schema, and a boolean query value must be "true" or "false". show_all=invalid and sync_id=12abc now answer 400 invalid_argument. - ROUTE_ARG_ALIASES no longer backtracks exponentially (CodeQL #84); it matches the same text on every RouteArg in src/cpp. - The 405 row names the prefixes that actually answer it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * Leave missing-argument errors on Raw routes to their handlers pull/variants and registry/search report a missing required query argument with their own message, which clients and test_030 match on. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(docs): removed markdown sections by #3834 * test: align missing-model error with HTTP refactor --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> Co-authored-by: Florian Reinle <[email protected]> |
||
|
|
c236963ca9 |
fix(backends): resolve a *_bin directory to the binary inside it (#3893)
* fix(backends): resolve a *_bin directory to the binary inside it
find_external_backend_binary returned a directory override unchanged, so
lemond tried to exec the directory ("Failed to execute .../bin"). Look for
the backend binary (plus .exe on Windows) at the directory's top level.
* test: per-run temp dir and cleared Vulkan override in the *_bin directory test
|
||
|
|
3614598dc8 |
Improve lemonade launch pi integration (#3786)
* feat(cli): write model metadata and keep the API key off disk for pi
lemonade launch pi now writes per-model contextWindow/maxTokens (from the
model's saved ctx_size, 40960 otherwise, as before), image input for vision
models, and an off/on thinking toggle for reasoning models. The provider
sets llama.cpp-friendly compat flags.
models.json references ${LEMONADE_API_KEY} when a key is configured, which
launch exports to pi, and keeps the "lemonade" placeholder otherwise.
Launch warns when the selected model is not labeled tool-calling.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* feat(cli): add Lemonade MCP to pi with launch pi --mcp
--mcp adds a "lemonade" streamable HTTP server to pi's mcp.json and
--no-mcp removes it; other servers, top-level keys and user-set keys on
the entry are kept. An existing entry is refreshed on every launch so it
follows the current host, port and key. The Authorization header
references ${LEMONADE_API_KEY} and is omitted without a key, and tools use
direct exposure so the entry does not switch codemode on.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* feat(cli): add launch pi --codemode
--codemode passes --tools +codemode for that launch only, without changing
pi's settings. Combined with --mcp, codemode scripts can call Lemonade's
MCP tools, for example lemonade_generate_image, and show the result with
image().
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* test(cli): cover the JSON launch pi writes into pi's agent directory
Unit tests for the models.json provider block (llama.cpp compat, context
window, vision, reasoning) and for merging, refreshing and removing the
lemonade server in mcp.json.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* test(cli): cover launch pi metadata, key, MCP and codemode end to end
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* docs: describe launch pi MCP, codemode, images and the API key reference
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* refactor(cli): read pi settings.json with read_json_object
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* test(cli): pin pi's apiKey value and MCP header refresh in PiProfileTest
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): fall back to the default window for an auto ctx_size in launch
A saved ctx_size of -1 (auto) reached pi as -1, so no contextWindow was
written and pi used its own 128000-token default instead of Lemonade's
40960 fallback.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): use launch's --ctx-size for the selected model's agent window
launch loads the model with its own recipe options, but agent configs
were written from the saved ctx_size only, so pi (and opencode/junie)
could be told a window larger than the one the model runs with.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): give a not-yet-downloaded launch model its labels and window
The agent model list holds only downloaded models, so a selected model
that was not downloaded yet went in with no labels and the default
window: pi lost image input and the thinking toggle, and skipped the
tool-calling warning. launch now looks the model up with
GET /api/v1/models/<id> and builds its entry from the same parsing as
the list, falling back to a bare entry when the server does not know it.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* docs: update pi's launch intro and window notes for the launch fixes
The intro listed only models.json with the selected model and
settings.json; it now lists all three files. The window notes cover
launch's --ctx-size and an automatic ctx_size, and cli.md names the
${LEMONADE_API_KEY} reference as it appears in models.json.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): drop stdio keys and keep user auth when refreshing pi's MCP entry
Refreshing an existing "lemonade" entry in pi's mcp.json now removes
command/args/env/cwd and any non-HTTP type, since pi rejects a url entry
with a stdio or sse type. A launch without an API key only removes the
Authorization header when it is Lemonade's own ${LEMONADE_API_KEY}
reference.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): use https in pi's config when the server is reached over TLS
build_agent_server_base_url always returned http://, so launching pi
against an https host wrote http URLs into models.json and mcp.json. It
now takes an optional is_ssl, which launch passes for pi only; the other
agents' URLs are unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): leave thinking to the model and server in launch pi
Launch no longer writes reasoning, thinkingLevelMap or thinkingFormat
for pi's models, or supportsReasoningEffort for the provider. The
qwen-chat-template toggle only works for models whose chat template
reads enable_thinking, and the CLI cannot tell which ones do: the
reasoning label does not say, and the DeepSeek-R1 Qwen distills carry a
Qwen name without the toggle. Pi still shows a model's reasoning output,
since it reads reasoning_content for every model.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): drop supportsDeveloperRole from launch pi's provider
Pi only sends a developer message for models marked reasoning, and
launch no longer marks any, so the setting had no effect.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): warn when launch pi is given a model the server does not know
A mistyped --model started pi without any message: the selected model
went into models.json without labels, which also skipped the
tool-calling warning, and the background load failed silently. When the
server answers 404 for the model, launch pi now says so. Other lookup
failures and the other agents are unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): drop pi's MCP credentials when launch points it at another server
Refreshing the lemonade entry in pi's mcp.json kept its headers, oauth
and auth settings when the url moved to a different server, so pi would
send credentials meant for the old server to the new one. They are now
removed when the url changes; a refresh against the same server keeps
them as before.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): stop launch pi when --no-mcp cannot remove the MCP server
When removing the lemonade entry from pi's mcp.json failed, launch only
warned and started pi with the server still enabled. Since the user
asked for the removal explicitly, launch now exits with an error
instead. --mcp failures and the automatic refresh still only warn.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): keep pi's mcp.json permissions and symlink when launch rewrites it
Launch rewrote mcp.json through a new temp file, so a private 0600 file
holding other servers' tokens became world-readable under the default
umask, and a symlinked mcp.json was replaced by a regular file. The
write now goes to the symlink's target and the temp file takes the
existing file's permissions. settings.json gets the same treatment.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* test(cli): pin that another form of pi's MCP url counts as another server
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): stop launch pi when a key is set and pi's config cannot be updated
Pi's config references ${LEMONADE_API_KEY}, which launch exports. When
models.json, or an existing lemonade entry in mcp.json, could not be
updated, launch warned and started pi anyway, so pi sent this server's
key to the server its old config still pointed at. With a key, launch
now exits with an error instead. Without a key it still warns and
continues, and other agents are unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): stop launch pi with a key when pi's mcp.json cannot be read
Launch treated an mcp.json it could not parse as having no lemonade
entry, so it skipped the refresh and started pi with the key exported.
Pi reads the file with Node, which tolerates invalid UTF-8, so a stale
entry in such a file would get this server's key. With a key, launch
now stops when mcp.json exists but cannot be read. A missing file and
launches without a key are unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* docs: note the pi versions launch pi --mcp and --codemode need
--mcp relies on pi's built-in MCP support and is ignored by pi before
1.0. --codemode passes --tools +codemode, and pi only accepts +name
entries in --tools from 1.1.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): give pi the auto-tuned context size of the launched model
With an automatic ctx_size, launch wrote the 40960 fallback to pi's
models.json, while the server sized the model at load, so pi compacted
by a window the model did not have. When the launched model's size is
automatic, launch now loads it before starting pi and writes the window
the server reports for the loaded model. If the load fails, pi gets the
fallback as before. Other agents are unchanged.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): check pi is installed before launch loads a model for its window
Launch synced pi's config, which can now load the model to read its
auto-tuned window, before looking for the pi binary. With pi missing,
launch loaded the model, evicting others, and only then failed. Pi's
config sync now runs after the binary is found. Other agents keep their
order.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): warn when launch pi can't read the loaded model's context size
When the load succeeded but the server reported no context size, launch
gave pi the 40960 fallback without saying so, and a failed read was
reported as a failed load. Launch now names the step that failed, warns
when no size was reported, and says which size pi gets instead.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* docs: note that launch pi waits for the load when the context size is automatic
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): stop launch pi when the model it waits on fails to load
When launch loads the model to read its auto-tuned window and the load
fails, it now prints the server's error and exits without starting pi,
which would otherwise run on a model that can't answer. A load that
succeeds without a readable size still falls back to 40960 with a
warning. Launches with a known window keep loading in the background.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* docs: say launch pi with --model may wait for the load
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* feat(cli): check pi's version when launch pi gets --codemode or --mcp
--codemode passes `--tools +codemode`, which pi only reads as adding a
tool from 1.1, and pi ignores mcp.json before 1.0. When either flag is
passed, launch now runs `pi --version`: an older pi stops launch for
--codemode and gets a warning for --mcp. Output without a version is
not checked, so launch still starts pi.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
* fix(cli): skip launch's background load when pi's sync already loaded the model
When the launched model's context size is automatic, pi's config sync
loads it to read the window, and launch then sent the same load again in
the background. The router reused the loaded model, so the second request
did nothing. Launch now skips it after a sync load; other launches keep
loading in the background.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
|
||
|
|
1ba79d48ff |
Restore sdcpp rocm support on Windows (#3718)
* Restore sdcpp rocm support on Windows * llamacpp GPU assertion checks from 3717 * Shared helper, sd-cpp device line updated, CPU fallback fails the job rather than a warn * llamacpp clearer labels + a [WARN] matching sdcpp, run-page link + pointer * Reformat sdcpp validation table * Get internal linkage through static instead of namesspace * Move CI cache dir to C:\ci-lem-cache to prevent failure * CI + Product side fix * Update the max allowed cache dir value to 67 * Calculation of max allowed cache dir length updated to be independent of ROCm install layout * Stop CI from being stricter than product * Addressing CodeRabbitAI's review * Remove leftover therock-wheels folder * Resolving Krishna's comments * Fix ROCm path guard failing open and llama.cpp CI cache teardown order * Harden GPU offload gate and ROCm HIP runtime staging * Fix UNC long-path prefix and make the rocBLAS depth marker write atomic |
||
|
|
333469dd03 |
fix(auto-tune): improve context sizing to avoid GPU memory pressure (#3862)
* fix(auto-tune): improve context sizing to avoid GPU memory pressure * adress review feedback * refactor(auto-tune): simplify memory budget accounting * fix(auto-tune): handle unknown GPU memory usage safely * fix(auto-tune): handle missing unified memory metrics and context previews * fix(auto-tune): require RAM telemetry for unified memory budgets * fix(auto-tune): preserve unknown physical RAM capacity * fix(auto-tune): correct context limits and small UMA budgets * fix(auto-tune): estimate BERT encoder KV memory from GGUF dimensions |
||
|
|
6e27237439 |
Add conformance tests (phase 2: model-backed) (#2865)
* Added infra for semantics conformance tests * Modifide conformance tests code * Minor fix and comment in conformance tests engine * Added l0a cases to conformance tests * Added l2 corupus to conformabnce tests * Added l3 corpus to conformance tests * Added point band test to l3 corpus to conformance tests * Added explicit rule to default model case to l1 corpus in conformance tests * Immporved classfiers ids consistencey in conformance tests * Removed trace reporting block from conformance tests runner * Modified conformance tests runner -- now it compiles engine per case * Updated conformance tests documentation * Add case for locking regex dialect to ECMAScript in conformance tests * Added implicit labels cases for l0a and l2 in conformance tests * Reject conformance test rows with unknown keys * Added request mapping and leaf order cases to conformance tests * Merged duplicate l0a router policy dirs in conformance tests * Fixed inaccurate claims in conformance tests documentation * test(conformance): make a null embed fail explicitly instead of via an empty vector * test(conformance): make a null embed fail explicitly instead of via an empty vector * drop within-tolerance score deltas from mismatch report in conformance tests * scope score tolerance to semantic_similarity scores only in conformance tests * share one score-tolerance predicate between matcher and reporter in conformance tests * Tidied conformance tests runner * Modified FakeClassifierService to record unexpeced calls * Removed stale comment in fake_classifier_serivices.h * Updated policy json parsing and building in comformance tests * Fail a structurally bad policy once up front in conformance tests * Add self-test for row guards in conformance tests * Consolided some policies in conformance tests * Further consolidated conformance tests * Removed redundant cases in conformance tests * Further consoldation of conformance tests * Added stray file detection and non-string guard in confrmance tests * Merged polices within tiers * Compact policies.json formatting in routing conformance tiers * test(conformance): reject separators in corpus case names, label cases with :: * Removed redundant paragrapsh for conformance corpus readme * minor formatting cahnge in conformnce test harness * test(conformance): compare decisions against an explicit field list * test(conformance): explicit scores for dfferent fields * test(conformance): apply the score tolerance to every trace score * test(conformance): move the decision comparison to its own header * docs(conformance): rewrote conformance tests readme * Merged l1_conditions_total_char_bounds into l1 tier tests * test(conformance): Comments fix in testing harness * test(conformance): use the shared unknown-service check in the corpus runner * test: continue past per-case policy build failures in conformance corpus * test(conformance): fail a case that declares a stub it never calls * test(conformance): reject a policy name declared twice in policies.json * test(conformance): rename harness headers and self-test for clarity * test(conformance): lock label precedence, max-only bands, raw equals, json fences and phrase embed failures * test(conformance): call the tier directory a tier, not a band * test(conformance): reject a duplicate object key anywhere in a corpus file * Added check for only README.md file in conformance corupus check * test(conformance): drop the schema-invalid metadata case from the corpus * test(conformance): apply the score margin only to computed scores * test(conformance): fail a row that mistypes a request field * test(conformance): require the expected tier set for each schema version * test(conformance): report a non-string trace condition as a mismatch * test(conformance): make the fake classifier services thread-safe * test(conformance): stop freezing key order inside multi-key leaves |
||
|
|
0100ec6ddd |
Fixes 3267: Model delete keeps files on the disk (#3765)
* Deleting a folder with split files- models sharing the same family isn't getting deleted * PR feedback: lenient directory check for errored file downloads and handing the wide file check * pr feedback: ensuring all the files are deleted by extending the search to .download_manifest.json * pr feedback: handling stale downloads * addressing pr feedback: handling manifest file * fixing CI failure by removing duplicate model checkpoints * pr feedback: handling more quantization formats * pr feedback: add back the stripped partial check * pr feedback: Fixed issues with occupancy and shards * pr feedback: edge cases * pr feedback: catch partial files too * macos- CI bug fix |
||
|
|
f2208e49ed |
test: isolate every C++ test from the real config dir (#3612)
* test: isolate every C++ test from the real config dir user_models.json and friends moved from the cache dir to the config dir in #3028, but the tests that isolate themselves only via set_cache_dir() were not updated. Since then, running the suite locally writes fixtures straight into the developer's ~/.config/lemonade/user_models.json: one run of test_model_manager_collection_validation registers 8 router/classifier models there, and test_model_registry adds 2 more. CI never notices because a fresh runner has no registry worth corrupting. Rather than add the missing call to each test, make isolation automatic. add_cpp_ci_test() is already the only supported way to declare a test, so it now links lemonade-test-isolation into the test executable, which points both dirs at a throwaway directory before main() runs. A test with its own layout to exercise (test_config_dir_migration) still overrides it by calling the setters itself, so there is no opt-out list to maintain. Drops the per-test temp-dir scaffolding that existed only for this, and roots the fixture dirs that are still needed at the isolated state dir. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(cmake): guard the test isolation library the way every test block does Two defects in the previous commit, both caught by CI: The .dockerignore excludes test/ entirely, so the Docker build configures a tree with no test sources at all. Every test block already guards on EXISTS "${_FOO_TEST_SRC}" for that reason; add_library() for the isolation TU did not, and failed the configure with "Cannot find source file". Guard it the same way. A tree that carries tests but not the isolation source is a contradiction rather than a case to tolerate, so add_cpp_ci_test() now fails loudly instead of silently linking nothing. Only 52 of the 81 test executables link lemonade-server-core, and get_config_dir() lives there. Linking the isolation TU into the other 29 left set_cache_dir/set_config_dir undefined at link time. Those tests also cannot reach the real config dir at all, so that link condition is the exact set that needs redirecting, not an approximation. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * test: harden C++ state isolation --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]> Co-authored-by: Florian Reinle <[email protected]> |
||
|
|
d9ac44641e | fix(server): expose live inference throughput across backends (#3791) | ||
|
|
25990159a0 |
fix(server): report NVIDIA GPU and VRAM usage (#3282)
* fix(server): report NVIDIA GPU and VRAM usage * fix(server): address NVIDIA metrics review feedback * adapt static options nvidia_metrics.h * refactor and consider multi gpu * add metric c++unit test * adreess review * fix(server): address NVIDIA metrics follow-up review * refactor the multi GPU handling * fix(server): library detection |
||
|
|
65b0518a67 |
feat(backends): label each backend with a tier and a format (#3706)
* feat(backends): label each backend with a tier and a format Every backend now declares a tier (core, community or experimental) and a format (native, python or container) in its descriptor's new labels map. /system-info reports both for each backend and support row, lemonade backends shows them as columns, and the generated support matrix lists them. Experimental backends are gated: lemonade backends install prints a disclaimer before it installs one for the first time, and the models of a recipe whose only backends on this system are experimental stay out of the model list until one of those backends is installed. ds4:rocm is the only experimental backend today. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * refactor(backends): share the installed-state check and pass system info to the experimental gate Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * refactor(backends): put tier and format in support rows, rename tiers to core/experimental/guest - Each BackendSupport row names its BackendTier and BackendFormat right after the backend name, replacing the descriptor's labels map and test_backend_labels. Rows for one backend on different OSes can carry different labels; /system-info reports this OS's row. - Tiers are core, experimental (maintainer-provided, not for production) and guest (published outside Lemonade's maintainers). ds4:rocm is guest. - Drop the descriptor's experimental flag and the "(experimental)" display name suffixes. /system-info derives each recipe's experimental field from its default_backend's tier. - The README support matrix marks experimental backends with a dagger and guest backends with a double dagger. - Drop the CLI install disclaimer for non-core backends. - Define tiers and formats once, in the Backend Tiers and Formats section of docs/api/lemonade.md, and link to it from the other docs. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(system-info): mark a recipe experimental when its selected backend is experimental or guest Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * revert(app): leave recipeNames.ts unchanged Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> |
||
|
|
1d63aa22e3 |
fix(models): preserve catalog identities in extra_models_dir (#3805)
* fix(models): preserve catalog identities in extra_models_dir * fix(models): handle sharded external caches safely * fix(models): preserve legacy multi-repo cache layouts |
||
|
|
0c8169f5bf |
refactor(server): run backend servers through ServerProcess and NativeProcess (#3705)
* refactor(server): run backend servers through ServerProcess and NativeProcess WrappedServer now owns one ServerProcess while a model is loaded, in place of a raw process handle and a separately recorded launch command. Each backend describes what to run in a ServerCommand and hands it to start_server(), which starts the process, polls its ready endpoint at the address the process reports, and starts the watchdog. Unload, the watchdog and a failed or cancelled load all end the server through stop_server() or ServerProcess::stop(). NativeProcess is the only ServerProcess so far and starts the binary through ProcessManager exactly as each backend did before. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * refactor(server): tighten ServerProcess ownership and error paths - ServerProcess stops its server on destruction; start_server stops a replaced process outside the lock - OpenMOSS voice design runs through NativeProcess - FLM and ORT skip troubleshooting output when a load was cancelled - /metrics scrapes the backend at the host it reports Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * refactor(server): reuse URL helpers and trim leftovers from the ServerProcess move - /metrics parses backend URLs with utils::parse_target_url; base URLs bracket IPv6 hosts - OpenMOSS voice design connects to the host its process reports and calls stop_server() directly - vLLM skips the CWSR hint when a load was cancelled - Drop the redundant stop in start_server, unused process_manager.h includes, and comments that restate the code Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * refactor(server): give WrappedServer a default unload() and drop per-backend leftovers unload() now defaults to stop_server(), and ~WrappedServer() stops the server, so backends whose unload() and destructor only did that drop them. The overrides that remain do real cleanup: vLLM's shim directory, OpenMoss's request lock, Cloud's state and whisper.cpp's temp directory. The ready log moves into wait_for_ready() with the server's base URL, replacing the per-backend "Model loaded on port" and "Server is ready" lines. RyzenAI reads its model path from model_info in load() instead of storing it through set_model_path(), and drops is_loaded_ and a model_name_ that shadowed the base member. Router destroys a server after unload(), so member resets in unload() (Moonshine, TheNoise, vLLM, OpenMoss, FLM) are removed. Comments in server_process.h, wrapped_server.cpp and test_launch_command.cpp now state specific contracts instead of restating names. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs: describe starting backends through start_server() and the default unload() adding-a-backend.md gains a "Starting the server process" section with a ServerCommand/start_server() example and the per-backend settings, and says unload() is optional. The OpenMOSS notes in backends-reference.md now name start_server(), the local NativeProcess designer and server_command() in place of the removed stop_speech_process() and spawn(). AGENTS.md drops unload() from the methods every backend implements. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * docs: leave AGENTS.md unchanged Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> |
||
|
|
ee87a42eab |
fix(models): give a shared folder name to one model in both forms (#3657)
* fix(models): give a shared folder name to one model in both forms A folder split into per-variant models keeps its old name as an input alias. When several folders share a name, as LM Studio's publisher/repo layout does for one repo from several publishers, every folder registered that alias. The bare form then resolved to the first model by id and the extra. form to the last, so the two forms of one name loaded different publishers' models. The first folder found now owns the name in both forms, as the custom model guide specifies, and later folders do not register it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(models): keep a shared folder name with the first folder over a later single model A folder split into variants keeps its name as an input alias, but a later single-model folder with the same name still registered that name as its model id, which outranks an alias, so both forms resolved to the later folder. The first folder found now owns the name whichever kind it is, and a later single-model folder is qualified with the folder that contains it, as in beta-Shared. A nested folder named after its reserved directory keeps the name it had, embeddings-embeddings, since its containing folder is that directory. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> * fix(models): keep a qualified id from shadowing a kept folder name Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01VJTtp4SMriYTjhJGc4NusG --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> |
||
|
|
f0a718d94b |
ci(hrx): bump hrx to b99 + add 26 perplexity-verified models (#3723)
Bump the pinned HRX llama.cpp release from hrx-b69 to hrx-b99. Add an -HRX catalog entry for every model whose HRX/Vulkan perplexity check passed in both regimes on the hrx-b99 release benchmark (ROCm/ggml-staging-automation run 36644473249, attempt 5). Entries are text chat only: HRX has no vision support, so vision labels and mmproj files are omitted. Labels and the suggested flag mirror each model's llamacpp entry. Gemma-4-12B-it also passed the HRX/Vulkan comparison but is held back: its absolute PPL on both backends (~489 prefill, ~750 decode) is far outside the 5-25 range of every other model, so the evaluation of that GGUF is suspect independent of HRX. Co-authored-by: Claude Fable 5.1 <[email protected]> |