From b96d5886684428eb64a0f186ab7496af8c18752a Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 26 Jan 2026 15:24:32 +0100 Subject: [PATCH] common : add specific warning for multiple -m options This commit updates the deprecation warning for multiple model options with a specific message that does not mention comma-separated values as an option. The motivation for this is that currently it can be confusing if multiple model options are specified with llama-server as this would display the following warning: ```console DEPRECATED: argument '--model' specified multiple times, use comma-separated values instead (only last value will be used) ``` But llama-server does not support a comma-separated models option. With this change the user is informed that multiple models can be supported in router mode if using llama-server: ```console DEPRECATED: multiple --model options are not supported (only last value will be used). Use router mode for llama-server (see --help) ``` --- common/arg.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/common/arg.cpp b/common/arg.cpp index 04fd375d56..24ebd9a012 100644 --- a/common/arg.cpp +++ b/common/arg.cpp @@ -489,7 +489,12 @@ static bool common_params_parse_ex(int argc, char ** argv, common_params_context throw std::invalid_argument(string_format("error: invalid argument: %s", arg.c_str())); } if (!seen_args.insert(arg).second) { - LOG_WRN("DEPRECATED: argument '%s' specified multiple times, use comma-separated values instead (only last value will be used)\n", arg.c_str()); + if (arg == "-m" || arg == "--model") { + LOG_WRN("DEPRECATED: multiple %s options are not supported (only last value will be used). " + "Use router mode for llama-server (see --help)\n", arg.c_str()); + } else { + LOG_WRN("DEPRECATED: argument '%s' specified multiple times, use comma-separated values instead (only last value will be used)\n", arg.c_str()); + } } auto & tmp = arg_to_options[arg]; auto opt = *tmp.first; @@ -848,7 +853,12 @@ bool common_params_to_map(int argc, char ** argv, llama_example ex, std::map