[Misc] Add type assertion of request_id for LLMEngine.add_request (#19700)

Signed-off-by: n2ptr <xuzhanchaomail@163.com>
This commit is contained in:
Chales Xu
2025-06-28 13:47:36 +08:00
committed by GitHub
parent c329ceca6d
commit e53be6f00a
3 changed files with 14 additions and 5 deletions

View File

@@ -687,6 +687,10 @@ class LLMEngine:
>>> # continue the request processing
>>> ...
"""
if not isinstance(request_id, str):
raise TypeError(
f"request_id must be a string, got {type(request_id)}")
if lora_request is not None and not self.lora_config:
raise ValueError(f"Got lora_request {lora_request} but LoRA is "
"not enabled!")