From: Sebastian Dröge Date: Sun, 12 Jul 2026 22:48:13 +0000 (+0300) Subject: server: Don't consider models with --no-mmproj-auto as multimodal (#25590) X-Git-Tag: upstream/0.0.10438~458 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=8014d2cf97a2419ca00d9d902be73ee411d61630;p=pkg%2Fggml%2Fsources%2Fllama.cpp 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. --- diff --git a/tools/server/server-models.cpp b/tools/server/server-models.cpp index d1fdc0607..7c6bfda0f 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());