fix: Qwen3.8 chat template to honor 'enable_thinking'

#6
by Olyno - opened

Fix Qwen3.8 enable_thinking handling

chat_template.jinja always emitted a closed <think></think> block, so enable_thinking=true had no effect.

This PR makes the generation prompt conditional:

  • enable_thinking=true β†’ opens <think> and lets the model close it naturally.
  • enable_thinking=false β†’ keeps the empty closed think block.

Tested with SGLang: thinking now ends naturally and the final answer is generated correctly.

Olyno changed pull request title from fix: jinja file to fix: Qwen3.8 chat template to honor 'enable_thinking'
Olyno changed pull request status to open
Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment