[ROCm][CI] Stabilize 400 error return code for invalid schema inputs (#43016)

Signed-off-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
Andreas Karatzas
2026-05-24 10:06:49 +00:00
committed by GitHub
parent 357fddf614
commit 5940590855
11 changed files with 74 additions and 20 deletions
@@ -218,8 +218,6 @@ class OpenAIServingChatBatch(OpenAIServingChat):
``check_batch_mode`` validator, so neither needs to be handled here.
"""
created_time = int(time.time())
role = self.get_chat_request_role(request) # type: ignore[arg-type]
final_results: dict[int, RequestOutput] = {}
try:
async for prompt_idx, res in merge_async_iterators(*generators):
@@ -275,6 +273,12 @@ class OpenAIServingChatBatch(OpenAIServingChat):
reasoning = None
content = output.text
role = (
self.response_role
if request.add_generation_prompt
else request.messages[prompt_idx][-1]["role"]
)
message = ChatMessage(role=role, reasoning=reasoning, content=content)
if request.echo: