From 8bf10e71cd7e9e58784759c9a1d7d273ee0d91bc Mon Sep 17 00:00:00 2001 From: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com> Date: Fri, 12 Dec 2025 04:26:13 +0000 Subject: [PATCH] remove dpsk3.2 sys prompt (#14923) Signed-off-by: Xinyuan Tong --- .../sglang/srt/entrypoints/openai/serving_chat.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/python/sglang/srt/entrypoints/openai/serving_chat.py b/python/sglang/srt/entrypoints/openai/serving_chat.py index 4b1762ab6..26685cf2c 100644 --- a/python/sglang/srt/entrypoints/openai/serving_chat.py +++ b/python/sglang/srt/entrypoints/openai/serving_chat.py @@ -286,18 +286,13 @@ class OpenAIServingChat(OpenAIServingBase): template_content_format = self.template_manager.jinja_template_content_format if self.use_dpsk_v32_encoding: - if request.chat_template_kwargs and request.chat_template_kwargs.get( + thinking_mode = ( "thinking" - ): - thinking_mode = "thinking" - else: - thinking_mode = "chat" + if (request.chat_template_kwargs or {}).get("thinking") + else "chat" + ) messages = request.messages messages = [msg.model_dump() for msg in messages] - if messages[0]["role"] != "system": - messages.insert( - 0, {"role": "system", "content": "You are a helpful Assistant."} - ) if request.tools: messages[0]["tools"] = [tool.model_dump() for tool in request.tools] real_input = encode_messages(