Files
LocalAI/pkg/huggingface-api
mudler-agentandEttore Di Giacinto b700da3eb3 fix(huggingface): list repos nested more than one directory deep (#12355)
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>
Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
2026-09-29 10:37:31 +02:00
..