[Model] Add DeepSeek-V3.1 reasoning parser (split from PR #24972) (#25589)

Signed-off-by: taohui <taohui3@gmail.com>
Signed-off-by: Tao Hui <taohui3@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
This commit is contained in:
Tao Hui
2025-10-15 11:09:52 +08:00
committed by GitHub
parent a2986b3e33
commit 85a65e7f51
6 changed files with 215 additions and 3 deletions

View File

@@ -570,7 +570,10 @@ class OpenAIServingChat(OpenAIServing):
try:
if self.reasoning_parser:
reasoning_parser = self.reasoning_parser(tokenizer)
reasoning_parser = self.reasoning_parser(
tokenizer,
chat_template_kwargs=request.chat_template_kwargs, # type: ignore
)
except RuntimeError as e:
logger.exception("Error in reasoning parser creation.")
data = self.create_streaming_error_response(str(e))
@@ -1335,7 +1338,10 @@ class OpenAIServingChat(OpenAIServing):
if self.reasoning_parser:
try:
reasoning_parser = self.reasoning_parser(tokenizer)
reasoning_parser = self.reasoning_parser(
tokenizer,
chat_template_kwargs=request.chat_template_kwargs, # type: ignore
)
except RuntimeError as e:
logger.exception("Error in reasoning parser creation.")
return self.create_error_response(str(e))