]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
common : skip model validation when --completion-bash is requested (#17975)
authorSigbjørn Skjæret <redacted>
Sat, 13 Dec 2025 07:40:50 +0000 (08:40 +0100)
committerGitHub <redacted>
Sat, 13 Dec 2025 07:40:50 +0000 (08:40 +0100)
common/arg.cpp

index 788a9ab4e62ea5f0e79a7fc929156e00d39fbe83..19f22f883fd488f21109a66cde45bbff069599c4 100644 (file)
@@ -504,7 +504,7 @@ static bool common_params_parse_ex(int argc, char ** argv, common_params_context
 
     // model is required (except for server)
     // TODO @ngxson : maybe show a list of available models in CLI in this case
-    if (params.model.path.empty() && ctx_arg.ex != LLAMA_EXAMPLE_SERVER && !params.usage) {
+    if (params.model.path.empty() && ctx_arg.ex != LLAMA_EXAMPLE_SERVER && !params.usage && !params.completion) {
         throw std::invalid_argument("error: --model is required\n");
     }