]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
common : respect specified tag, only fallback when tag is empty (#21413)
authorAdrien Gallouët <redacted>
Sat, 4 Apr 2026 13:08:03 +0000 (15:08 +0200)
committerGitHub <redacted>
Sat, 4 Apr 2026 13:08:03 +0000 (15:08 +0200)
Signed-off-by: Adrien Gallouët <redacted>
common/download.cpp

index ad720f977b4389d024a48ffd22c98d1153dc985f..9d7995c9d2379e506070948ed28af803f6ad0b86 100644 (file)
@@ -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;
+            }
         }
     }