Repository navigation
fix(huggingface): list repos nested more than one directory deep - #12355
Merged
Merged
Conversation
The HuggingFace tree API returns each entry's path relative to the repo
root ("assets/plots", not "plots"). The recursive listing prefixed the
parent directory again, so it requested "assets/assets/plots", got a
404, and failed the whole listing. The importer then treated the URI as
a non-HF repo and no importer matched.
This broke the import of GGUF repos that keep per-quant subfolders next
to a nested assets tree, such as
ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF.
The test mock now returns root-relative directory paths like the real
API and routes on the exact tree path, so a doubled path 404s.
Assisted-by: Claude:claude-opus-5-5 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
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.
Description
Importing https://huggingface.co/ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF failed with
no importer matched.The cause is the HuggingFace file listing, not the llama.cpp importer. The tree API returns each entry's path relative to the repo root (
assets/plots, notplots). The recursive listing prefixed the parent directory again, requestedassets/assets/plots, got a 404, and failed the whole listing.DiscoverModelConfigthen treated the URI as a non-HF repo, so no importer matched. Any repo nested more than one directory deep is affected. Per-quant subfolders one level deep (Q2_0/,IQ3_S/) were fine; the nestedassets/plots/tree is what broke it.Notes for Reviewers
The existing subfolder test did not catch this because its mock returned the nested directory as
"nested"and routed requests by substring. The mock now returns root-relative paths like the real API and routes on the exact tree path, so a doubled path 404s. The test fails on master with the same error seen against the live repo.How to verify:
go run github.com/onsi/ginkgo/v2/ginkgo ./pkg/huggingface-api/ ./core/gallery/importers/https://huggingface.co/ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF. With no preference it selects both Q2_0 shards plusmmproj-Qwen3.8-Flash-Next-BF16.gguf, which is set asmmproj:in the config (noq4_k_mexists, so the usual last-group fallback applies). With{"quantizations":"iq3_s"}it selects both IQ3_S shards.Signed commits
π€ Generated with Claude Code