Repository navigation
Conversation
…tead of downloading it - the quant picker names the file, not the bare repo id A quant row carries <org>/<repo>/<file>.gguf, which no resolver index key matches, so the unslothai#13034 rewrite skipped it and the planner re-downloaded the repo; under disk pressure it even swapped the wanted quant for a smaller one. Split the file form out, look the repo up by the file's variant key, and take it only when the named file is the one the resolved quant is served from.
…ile-id - sync branch with upstream before re-cutting the patch 3 upstream commit(s) since the branch base; see git log for the range.
…ile-id - sync branch with upstream before re-cutting the patch 179 upstream commit(s) since the branch base; see git log for the range.
…rewrite - _gguf_variant_key falls back to the stem
…ed accounts remote
This was referenced Oct 12, 2026
…pi-key - sync branch with upstream before re-cutting the patch 125 upstream commit(s) since the branch base; see git log for the range.
…pi-key - sync branch with upstream before re-cutting the patch 165 upstream commit(s) since the branch base; see git log for the range.
…pi-key - sync branch with upstream 692 upstream commit(s) since the branch base; see git log for the range.
…pi-key - sync branch with upstream 731 upstream commit(s) since the branch base; see git log for the range.
Contributor
Author
|
Updated the PR branch The fix extends local scan-folder resolution to API-key sessions and repo/file.gguf identifiers. Without it, these load requests can trigger a download even when the requested GGUF is already available in a registered scan folder. Together, #12258, #12803, and #13343 improve support for complete model copies stored in registered Custom Folders (chat picker visibility, API catalog listing, and local loading). |
…pi-key - sync branch with upstream 623 upstream commit(s) since the branch base; see git log for the range.
… branch with upstream
…pi-key - sync branch with upstream 1050 upstream commit(s) since the branch base; see git log for the range.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Widens the #13034 scan-folder rewrite in two ways.
The following cases from the same family may still re-download after #13034; this PR closes both (the branch is stacked, so a split into two PRs is easy if preferred):
The repo/file form. The quant picker and remembered quant entries send
org/repo/File.gguf, and the repo-id check never matches a file path — so it re-downloads even in an owner session. This resolves that form to the local copy under the same guards. Reproduced live: a file-form load re-downloaded while the parked copy sat on disk (09.10./11.10., server logs available).API-key sessions. The rewrite was owner-session-only: a load by repo id through the API re-downloaded although the model is listed in the catalog and the copy is on disk. A listed, locally present model is now simply served from that copy — the gate becomes "locally managed session"; managed accounts keep the remote semantics, matching the conservative precedent of the refused-repo cached-copy gate (
_refused_repo_cached_gguf; owner-session-only there). Reproduced live: an API-key load started a download for a listed, on-disk model (11.10.).Why
The hub-cache path already serves local copies to API-key sessions, and the sibling ollama-manifest rewrite gates on managed/lease only — a listed, locally present model re-downloading was the odd one out. The file form simply fell through the bare-id lookup.
Tests
tests/test_load_scan_folder_resolution.py— 31 cases: repo/file id resolution (the file wins over a pinned variant; stale/companion names stay remote), the managed-account/API-key split at both call sites, and the offline validate flow for an API-key caller.Known limitations
repo/subdir/file.ggufids (4+ segments) and sharded GGUFs keep the remote path.Related: #12803 (catalog side) is being reworked against Etherll's review, keeping the separate Custom Folders row, consistent with this resolver's cache-first order; #12258 (picker side) is unchanged in goal.