From 14b4e6fa69234c9ab7ead8862ff7cb40b645d1b8 Mon Sep 17 00:00:00 2001 From: Lianmin Zheng Date: Tue, 28 Apr 2026 17:23:27 -0700 Subject: [PATCH] Support --model as alias for --model-path in CLI (#23894) --- python/sglang/cli/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sglang/cli/utils.py b/python/sglang/cli/utils.py index 612f01d8c..bc3f5b3e8 100644 --- a/python/sglang/cli/utils.py +++ b/python/sglang/cli/utils.py @@ -103,11 +103,11 @@ def get_model_path(extra_argv): # Find the model_path argument model_path = None for i, arg in enumerate(extra_argv): - if arg == "--model-path": + if arg in ("--model-path", "--model"): if i + 1 < len(extra_argv): model_path = extra_argv[i + 1] break - elif arg.startswith("--model-path="): + elif arg.startswith("--model-path=") or arg.startswith("--model="): model_path = arg.split("=", 1)[1] break