abort requests (#6992)

This commit is contained in:
qwes5s5
2026-03-31 11:02:26 +08:00
committed by GitHub
parent 6d9739f360
commit daa95244f7
13 changed files with 670 additions and 3 deletions
@@ -586,6 +586,8 @@ class OpenAIServingCompletion:
output,
tool_called[idx],
)
if res.get("error_msg") is not None and "Aborted" in res["error_msg"]:
choices[-1].finish_reason = "abort"
inference_start_time[idx] = 0
send_idx = output.get("send_idx")
@@ -726,6 +728,8 @@ class OpenAIServingCompletion:
output,
False,
)
if final_res.get("error_msg", None) is not None and "Aborted" in final_res["error_msg"]:
finish_reason = "abort"
choice_data = CompletionResponseChoice(
token_ids=token_ids,