From 2eb2a50fd94b02bfe06d19aeb0daf1132beb0720 Mon Sep 17 00:00:00 2001 From: guojn1 Date: Mon, 17 Aug 2026 17:24:30 +0800 Subject: [PATCH] [fix][dingo] Ensure consistency in the usage of chat_template_kwargs and chat_template_args between the sglang and vllm backends --- dingo/frontend/prepost.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dingo/frontend/prepost.py b/dingo/frontend/prepost.py index 003813e99ce6..7d90e2605420 100644 --- a/dingo/frontend/prepost.py +++ b/dingo/frontend/prepost.py @@ -136,7 +136,10 @@ def _prepare_request( ) else None ) - chat_template_kwargs = dict(request_for_sampling.chat_template_kwargs or {}) + raw_ctk = ( + request.get("chat_template_args") if isinstance(request, dict) else None + ) + chat_template_kwargs = dict(request_for_sampling.chat_template_kwargs or raw_ctk or {}) chat_template_kwargs["reasoning_effort"] = request_for_sampling.reasoning_effort # Mistral warns that tokenize=False is unsafe for chat templates.