[Bugfix][Frontend] validate arg priority in frontend LLM class before add request (#27596)

Signed-off-by: Junpu Fan <junpufan@gmail.com>
This commit is contained in:
Junpu Fan
2025-10-28 07:02:43 -07:00
committed by GitHub
parent 2abbd351ef
commit b186149e8e
2 changed files with 26 additions and 0 deletions

View File

@@ -1565,6 +1565,12 @@ class LLM:
raise ValueError(
"The lengths of prompts and lora_request must be the same."
)
if priority is not None and len(priority) != num_requests:
raise ValueError(
"The lengths of prompts "
f"({num_requests}) and priority ({len(priority)}) "
"must be the same."
)
for sp in params if isinstance(params, Sequence) else (params,):
if isinstance(sp, SamplingParams):