From fba03b29e33696bd4eb05c872fddf600f723de17 Mon Sep 17 00:00:00 2001 From: shangmingc Date: Wed, 28 May 2025 15:39:46 +0800 Subject: [PATCH] [Bugfix] Fix missing abort finish reason for PD with ChatCompletion (#6693) Signed-off-by: Shangming Cai --- python/sglang/srt/openai_api/protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/openai_api/protocol.py b/python/sglang/srt/openai_api/protocol.py index 7c40a70dc..e5f228a30 100644 --- a/python/sglang/srt/openai_api/protocol.py +++ b/python/sglang/srt/openai_api/protocol.py @@ -413,7 +413,7 @@ class ChatCompletionResponseChoice(BaseModel): message: ChatMessage logprobs: Optional[Union[LogProbs, ChoiceLogprobs]] = None finish_reason: Literal[ - "stop", "length", "tool_calls", "content_filter", "function_call" + "stop", "length", "tool_calls", "content_filter", "function_call", "abort" ] matched_stop: Union[None, int, str] = None