diff --git a/python/sglang/srt/server_args.py b/python/sglang/srt/server_args.py index 463a78514..dd5bc924c 100644 --- a/python/sglang/srt/server_args.py +++ b/python/sglang/srt/server_args.py @@ -3678,6 +3678,13 @@ class ServerArgs: None, }, "moe_dense_tp_size only support 1 and None currently" + # Check served model name to not have colon as it is reserved for LoRA adapter syntax + assert ":" not in self.served_model_name, ( + "served_model_name cannot contain a colon (':') character. " + "The colon is reserved for the 'model:adapter' syntax used in LoRA adapter specification. " + f"Invalid value: '{self.served_model_name}'" + ) + # Check LoRA self.check_lora_server_args()