Support v1/responses and use harmony in serving_chat (#8837)

Signed-off-by: Xinyuan Tong <justinning0323@outlook.com>
Signed-off-by: Xinyuan Tong <xinyuantong.cs@gmail.com>
Co-authored-by: Xinyuan Tong <justinning0323@outlook.com>
Co-authored-by: Xinyuan Tong <xinyuantong.cs@gmail.com>
This commit is contained in:
Chang Su
2025-08-06 16:20:34 -07:00
committed by GitHub
parent cbbd685a46
commit 92cc32d9fc
16 changed files with 2878 additions and 43 deletions

View File

@@ -126,6 +126,9 @@ class GenerateReqInput:
# For data parallel rank routing
data_parallel_rank: Optional[int] = None
# For background responses (OpenAI responses API)
background: bool = False
def contains_mm_input(self) -> bool:
return (
has_valid_data(self.image_data)
@@ -560,6 +563,9 @@ class EmbeddingReqInput:
# For cross-encoder requests
is_cross_encoder_request: bool = False
# For background responses (OpenAI responses API)
background: bool = False
def normalize_batch_and_arguments(self):
# at least one of text, input_ids, or image should be provided
if self.text is None and self.input_ids is None and self.image_data is None: