Repository navigation
fix: move withdrawn presets to public repos and save presets by id; 12110:0 → 12110:1 - #47
Conversation
…t-sdk to 4.1.0; 12110:0 → 12110:1 unsloth made its Qwen2.5 7B/14B/32B and Meta-Llama-3.1-8B GGUF repos non-public (the HF API returns 401), so llama-server can't resolve a file for those presets and exits. The presets now point at Qwen's own GGUF repos and bartowski's Llama 3.1 8B (Meta publishes no GGUF). The migration rewrites a saved -hf selection of a withdrawn repo only when none of its weights are cached: llama-server falls back to hf_cache::get_cached_files when the repo lookup fails (common_download_get_hf_plan at b12110), so a cached copy still loads and moving it would force a needless re-download. UPDATING.md gains a per-bump check that every preset repo is public and carries its quant; README documents the failure for support. Closes #46 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
helix-white
left a comment
There was a problem hiding this comment.
Requesting changes on the migration in startos/versions/current.ts:
-
Match the cached target, not just its repo. The early return accepts any cached GGUF from the old repo. A user can have Q8_0 cached and select the Q4_K_M preset before updating; the migration then retains the withdrawn repo even though the requested weights are absent. In b12110
common_download_get_hf_plan, the cache fallback still callsfind_best_modelwith the requested quant, so startup still fails. The proposal shares Set Model's existing target parsing/quant matching with the migration and checks the selected file/quant before preserving the old repo. -
Migrate the remembered settings alongside the repo. Only
serveArgsis rewritten.modelSettingsandmodelSelection.customstill identify the unsloth repo, whilesettingsForrequires the repo to match. After an uncached Qwen preset with non-default context/GPU layers/extra flags is migrated, reopening Set Model shows defaults, and submitting replaces the retained daemon settings with those defaults. Inactive affected presets also lose their remembered settings. The proposal rewrites the corresponding saved targets without changing their inference settings, including withdrawn repo overrides in saved extra arguments. -
Repair cache-free restores too. When the selected old model is cached, the migration deliberately keeps its withdrawn repo in
serveArgs. A backup taken afterward retains those arguments but excludesmodels/. Restoring that backup at12110:1does not cross this version edge, so the new migration does not run and the restored service attempts the withdrawn repo with no fallback weights. The proposal calls the same repair operation from restore init and records the cached-selection/settings/restore guarantees at that shared owner.
The proposal also locates the effective repo argument by its option position rather than lastIndexOf of its value, avoiding replacement of an unrelated later argument containing the same text.
Proposed changes: c3dc982...proposal/47
The reviewed head merges cleanly with master. Independently confirmed all four replacement HuggingFace repos are public, ungated, and list Q4_K_M weights. CI matrix discovery passed; all four variant builds are still running. No builds, tests, typechecks, or runtime checks were run for this review or the proposal; the implementing author must verify adopted changes.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
A preset selection used to be saved as a copy of its repo in serveArgs,
modelSettings, modelSelection.custom and the extra flags, so a withdrawn
upstream repo meant a data migration over all of them, plus a restore
hook, since a cache-free restore never crosses the version edge.
store.json now saves the model as {preset} or {hfRepo, hfFile} and the
remaining server flags as settingsArgs. main.ts resolves a preset against
presets.ts at every start: its hfRepo, unless only a repo in its new
formerRepos has the weights cached, matched by the preset's quant rather
than by repo. Settings are keyed the same way, and a repo entry that is a
preset's quant counts as that preset. Replacing a preset's repo is now an
edit to presets.ts; UPDATING.md and AGENTS.md say so.
The 12110:1 migration is now a one-time conversion of the old store:
every release wrote `-hf <repo> [-hff <file>]` first, so the model is
split off the front of serveArgs and matched to a preset, and each
modelSettings entry is matched the same way.
Verified on demo.local (generic x86_64): installed 12110:0, ran Llama 3.2
1B, then selected Qwen2.5 7B and reproduced #46 (401, model loading
error). Updated to this build: the store converted to {preset} entries
with ctx and extra flags intact, Qwen2.5 7B downloaded from Qwen's split
repo and served, and Set Model reopened on it with its settings. With the
weights moved under the unsloth cache folder, the server ran
-hf unsloth/...:Q4_K_M, got the 401, loaded the cached copy, and Delete
Model Cache kept that folder in use. Custom, preset and unchanged-resubmit
paths wrote clean refs, and the unchanged resubmit did not restart.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
helix-white
left a comment
There was a problem hiding this comment.
The preset-id approach addresses the earlier findings at their source: quant-specific cache resolution is shared, settings can retain a stable identity, and a restored preset resolves without cached weights. I reviewed the replacement approach on its merits rather than requiring the previous proposal. Four remaining issues need changes:
-
Preserve the saved preset id when migrating a cache-free legacy backup (
startos/versions/current.ts,toRef). Before this PR, a Custom model with an explicit-hffcould subsequently be selected as its matching preset; Set Model preserved the running repo/file arguments and saved the preset id inmodelSelection.selection. Backups omit the cache. Restore such a backup at the old version and update:matchingPresetcannot match the explicit file to the quant without cached files, so the migration writes a raw withdrawn repo despite having the selected preset id available. The preset still fails with 401. The proposal uses that recorded id for the active model and its matching settings entry, retaining the file-based inference fallback for other entries. -
Do not replace a Custom submission with the running preset (
startos/actions/setModel.ts, thesameRefpreservation shortcut). Withqwen25-7brunning from cached former Unsloth weights, submit Custom pointing atQwen/Qwen2.5-7B-Instruct-GGUF:Q4_K_M.sameRefdeliberately treats both publishers as equivalent to the preset, so the submitted raw target is discarded and the service keeps using Unsloth; the submitted Custom fields are also not saved because the retained preset has nohfRepo. Conversely, choosing a preset while an equivalent raw Custom ref is running retains the raw ref instead of saving the selected preset id. The proposal limits preservation of an existing raw reference to downloaded-cache selections: Custom honors its submitted target and explicit preset selections remain ids. -
Cache-deletion protection must survive changes in resolution after startup (
startos/actions/deleteModelCache.ts,inUseEntries). Start a preset with only its former repo cached and configure its current repo as the speculative draft. The main starts from the former repo; downloading the draft then populates the current repo. Delete Model Cache recomputesserveArgsOfagainst the new cache and protects only the current repo, allowing deletion of the former weights still held by the main process. The proposal conservatively protects all cached candidate repos of the selected preset, using the same candidate owner as resolution. It documents that extra reservation in both user docs; tracking the actual startup target would also satisfy the invariant. -
The new per-bump check must inspect gating, not just metadata availability (
UPDATING.md). Gated HuggingFace repos can return HTTP 200 and list GGUF files. For example, I read the API metadata forgoogle/gemma-3-1b-it-qat-q4_0-gguf: it listsgemma-3-1b-it-q4_0.ggufwhile reportinggated: "manual". The supplied checker would report that repo/quant as OK even though anonymous downloads are gated. The proposal requiresprivate: falseandgated: falsebefore checking filenames, and keeps the snippet compatible with itsshcode fence.
Proposed changes: c5767f0...proposal/47
Reviewed head c5767f0 merges cleanly with master. Current CI has successful matrix discovery, generic and Vulkan builds; NVIDIA and ROCm builds remain running (the retarget-build check is skipped). No builds, tests, typechecks, lint, or runtime execution were performed for this review or proposal. Please verify any adopted changes, especially the legacy-backup migration and selection/cache transitions above.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
…reset repo Adopts helix-white's proposal on #47, with the saved-id migration guarded to presets whose current or former repo is the saved one. - Migration: a legacy store whose modelSelection is a preset keeps that id even when its explicit -hff can't be matched to the quant without the cache (backups exclude it), and so does its settings entry. - Set Model: Custom saves the submitted target and a preset saves its id; only a downloaded-cache selection keeps the running raw ref. - Delete Model Cache protects every cached repo of the selected preset, since a later download can change which one a start would choose. - UPDATING.md's check requires private == false and gated == false and runs under POSIX sh. Verified on demo.local: the check passes the nine presets under dash and flags google/gemma-3-1b-it-qat-q4_0-gguf as gated. With qwen25-7b running from cached unsloth weights, Custom Qwen/...:Q4_K_M saved that raw ref and its Custom fields, and selecting the preset again saved {preset}. With both repos cached, Delete Model Cache disabled both and refused the unsloth one. A fresh 12110:0 with a hand-written legacy store (preset selected, unsloth repo with explicit -hff, empty cache) migrated to {preset: qwen25-7b} with its settings and started with -hf Qwen/Qwen2.5-7B-Instruct-GGUF:Q4_K_M -c 2048. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
helix-white
left a comment
There was a problem hiding this comment.
Approved at 93e47b7.
All four follow-up findings are addressed: legacy cache-free migrations retain the recorded preset id with the repo-membership guard and carry its settings forward; Custom submissions retain their requested target while preset selections save ids; deletion protects cached current/former preset candidates despite cache changes; and the POSIX update checker rejects gated/private repos.
Reviewed the changes since c5767f0 and the surrounding resolution, selection and migration paths. The head merges cleanly with master. Matrix discovery passed; all four variant builds were still running when inspected. No builds, tests, typechecks, lint or runtime execution were performed for this review.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol
Closes #46.
unsloth has made four of the repos our Set Model presets use non-public; the HuggingFace API answers 401, so
llama-serverresolves no file and exits.unsloth/Qwen2.5-7B-Instruct-GGUF(401)Qwen/Qwen2.5-7B-Instruct-GGUFunsloth/Qwen2.5-14B-Instruct-GGUF(401)Qwen/Qwen2.5-14B-Instruct-GGUFunsloth/Qwen2.5-32B-Instruct-GGUF(401)Qwen/Qwen2.5-32B-Instruct-GGUFunsloth/Meta-Llama-3.1-8B-Instruct-GGUF(401)bartowski/Meta-Llama-3.1-8B-Instruct-GGUF(Meta publishes no GGUF)The other five unsloth presets still answer 200 and have no publisher-official GGUF, so they stay.
Presets are now saved by id, not by repo. The first revision migrated the saved repo string, which the review showed has to be rewritten in four places (start command, per-model settings, custom entry, extra flags), matched by quant rather than repo, and repeated on restore. Rather than carry that for every future withdrawal,
store.jsonnow saves the model as{preset}or{hfRepo, hfFile}plus the remaining flags assettingsArgs, andmain.tsresolves a preset againstpresets.tsat every start. A preset's newformerReposkeeps a cached copy from an old repo in use: the current repo wins unless only a former one has the preset's quant cached, and llama-server falls back to cached files when HuggingFace refuses the repo (common_download_get_hf_plan, b12110). Settings are keyed the same way. Replacing a preset's repo is now an edit topresets.ts, with no migration and nothing special on restore.Migration (
12110:1) is a one-time conversion of the old store: every release wrote-hf <repo> [-hff <file>]first, so the model is split off the front ofserveArgsand matched to a preset (current or former repo, by the cached file or the quant), and eachmodelSettingsentry is matched the same way.Recurrence.
UPDATING.mdgains a per-bump check that every preset repo is public and carries its quant (it flags exactly these four onmaster), and says to fix a failure by moving the old repo intoformerRepos.AGENTS.mdforbids writing a preset's repo intostore.jsonor deleting a preset id;README.mddocuments the resolution and the 401 for Custom models.Verified on demo.local (generic, x86_64):
ctx 2048 --temp 0.5and reproduced Model presets fail to download:unsloth/*-GGUFrepos return HTTP 401 #46 (GET failed (401),exiting due to model loading error).{preset: 'qwen25-7b'}/{preset: 'llama-32-1b'}entries with every setting intact andserveArgsgone. Qwen2.5 7B downloaded from Qwen's split repo and served; Set Model reopened on it with its settings, and each preset kept its own.models--unsloth--Qwen2.5-7B-Instruct-GGUF: it served-hf unsloth/Qwen2.5-7B-Instruct-GGUF:Q4_K_M, logged the 401, and loaded the cached copy; Delete Model Cache kept that folder in use and no duplicate cached entry appeared.preset/hfRepokeys), and resubmitting the running model unchanged did not restart.{preset}resolves like the migrated store did with no cache, but I didn't exercise it.Second review (adopted proposal). A legacy store whose selection is a preset keeps that id through the migration even when its explicit
-hffcan't be matched without the cache (guarded to stores whose saved repo is one of that preset's); Custom saves the submitted target and a preset its id, with only a downloaded-cache selection keeping the running raw ref; Delete Model Cache protects every cached repo of the selected preset; theUPDATING.mdcheck rejects private and gated repos and runs under POSIXsh. Verified on demo.local: the check flagsgoogle/gemma-3-1b-it-qat-q4_0-ggufas gated underdash; CustomQwen/...:Q4_K_Mwhile the preset ran from unsloth weights saved that raw ref, and reselecting the preset saved{preset}; with both repos cached, both were protected and the delete refused; a fresh 12110:0 with a hand-written cache-free legacy store migrated to{preset: 'qwen25-7b'}with its settings and started-hf Qwen/Qwen2.5-7B-Instruct-GGUF:Q4_K_M -c 2048.Also: start-sdk 4.0.0 → 4.1.0; the Set Model help-text example (with its translations and
instructions.md) names a public repo.review effort: 'xhigh'
🤖 Generated with Claude Code