]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
server: Don't consider models with --no-mmproj-auto as multimodal (#25590)
authorSebastian Dröge <redacted>
Sun, 12 Jul 2026 22:48:13 +0000 (01:48 +0300)
committerGitHub <redacted>
Sun, 12 Jul 2026 22:48:13 +0000 (00:48 +0200)
If mmproj is explicitly disabled via the model preset or command-line
parameters then the model won't be able to handle image/audio inputs and
this shouldn't be declared as supported input modality on the /v1/models
endpoint.

tools/server/server-models.cpp

index d1fdc06079c886cdd996d0f5681f2b25905ac73e..7c6bfda0ff67b21fac97f96a455bb4e7e6c0b3f0 100644 (file)
@@ -219,13 +219,14 @@ void server_model_meta::update_caps() {
             "LLAMA_ARG_MODEL_URL",
             "LLAMA_ARG_MMPROJ",
             "LLAMA_ARG_MMPROJ_URL",
+            "LLAMA_ARG_MMPROJ_AUTO",
             "LLAMA_ARG_HF_REPO",
             "LLAMA_ARG_HF_REPO_FILE",
         });
         params.offline = true;
         common_models_handler handler = common_models_handler_init(params, LLAMA_EXAMPLE_SERVER);
         common_models_handler_apply(handler, params); // note: this won't download the model because offline=true
-        if (params.mmproj.path.empty()) {
+        if (params.no_mmproj || params.mmproj.path.empty()) {
             multimodal = { false, false };
         } else {
             multimodal = mtmd_get_cap_from_file(params.mmproj.path.c_str());