From 5a38f4a2fa0a38e6d4fe52cbec135686df860af9 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 2 Sep 2026 09:08:38 +0000 Subject: [PATCH] baseline8 fix d03 --- qwen3_6_scripts/serving_chat.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/qwen3_6_scripts/serving_chat.py b/qwen3_6_scripts/serving_chat.py index b26b58f5..e8a3d9aa 100644 --- a/qwen3_6_scripts/serving_chat.py +++ b/qwen3_6_scripts/serving_chat.py @@ -316,6 +316,16 @@ class OpenAIServingChat(OpenAIServing): tool.model_dump() for tool in request.tools ] + # [BI100] Ensure enable_thinking defaults to True when the + # request does not specify it. The Qwen3.5 chat template + # may disable thinking when tools are present and the flag + # is absent, which prevents the model from reasoning about + # tool selection and generating tags. + if request.chat_template_kwargs is None: + request.chat_template_kwargs = {} + if "enable_thinking" not in request.chat_template_kwargs: + request.chat_template_kwargs["enable_thinking"] = True + prompt: Union[str, List[int]] is_mistral_tokenizer = isinstance(tokenizer, MistralTokenizer) if is_mistral_tokenizer: