Support --model as alias for --model-path in CLI (#23894)

This commit is contained in:
Lianmin Zheng
2026-04-28 17:23:27 -07:00
committed by GitHub
parent 233048212a
commit 14b4e6fa69
+2 -2
View File
@@ -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