From 8014d2cf97a2419ca00d9d902be73ee411d61630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 13 Jul 2026 01:48:13 +0300 Subject: [PATCH] server: Don't consider models with --no-mmproj-auto as multimodal (#25590) 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/server/server-models.cpp b/tools/server/server-models.cpp index d1fdc06079..7c6bfda0ff 100644 --- a/tools/server/server-models.cpp +++ b/tools/server/server-models.cpp @@ -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());