]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
common : skip empty implicit default preset (#25643)
authorhogeheer499-commits <redacted>
Sat, 25 Jul 2026 19:15:27 +0000 (21:15 +0200)
committerGitHub <redacted>
Sat, 25 Jul 2026 19:15:27 +0000 (21:15 +0200)
The INI parser creates an implicit default section for top-level metadata.
After reserved keys such as `version` are skipped, that section can have no
model options but was still added and exposed in router mode.

Skip only the empty implicit default while preserving real default presets,
named presets, and the global `[*]` settings.

Signed-off-by: JS van Dijk <redacted>
Co-authored-by: JS van Dijk <redacted>
common/preset.cpp

index 4362c0621b78ea39f73b961d49a7d398053c0a9b..eb0c60b09cffb7c20bbdb8e5e975bdd91be5c3c2 100644 (file)
@@ -330,6 +330,10 @@ common_presets common_preset_context::load_from_ini(const std::string & path, co
             }
         }
 
+        if (preset.name == COMMON_PRESET_DEFAULT_NAME && preset.options.empty()) {
+            continue;
+        }
+
         if (preset.name == "*") {
             // handle global preset
             global = preset;