[Bugfix] Fix TypeError in scheduler when comparing mixed request_id types (#21816)

Signed-off-by: chiliu <chiliu@paypal.com>
Co-authored-by: chiliu <chiliu@paypal.com>
This commit is contained in:
633WHU
2025-07-30 23:54:44 +08:00
committed by GitHub
parent ad510309ee
commit 5c765aec65
2 changed files with 64 additions and 13 deletions

View File

@@ -207,6 +207,11 @@ class EngineCore:
def add_request(self, request: EngineCoreRequest):
"""Add request to the scheduler."""
# Validate the request_id type.
if not isinstance(request.request_id, str):
raise TypeError(
f"request_id must be a string, got {type(request.request_id)}")
if pooling_params := request.pooling_params:
supported_pooling_tasks = [
task for task in self.get_supported_tasks()