From: Adrien Gallouët Date: Sat, 4 Apr 2026 13:08:03 +0000 (+0200) Subject: common : respect specified tag, only fallback when tag is empty (#21413) X-Git-Tag: upstream/0.0.8681~18 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=d01f6274c01e111be2ccc39443f79884796e48fb;p=pkg%2Fggml%2Fsources%2Fllama.cpp common : respect specified tag, only fallback when tag is empty (#21413) Signed-off-by: Adrien Gallouët --- diff --git a/common/download.cpp b/common/download.cpp index ad720f977..9d7995c9d 100644 --- a/common/download.cpp +++ b/common/download.cpp @@ -596,9 +596,12 @@ static hf_cache::hf_file find_best_model(const hf_cache::hf_files & files, } } - for (const auto & f : files) { - if (gguf_filename_is_model(f.path)) { - return f; + // fallback to first available model only if tag is empty + if (tag.empty()) { + for (const auto & f : files) { + if (gguf_filename_is_model(f.path)) { + return f; + } } }