fix(qwen): always send explicit enable_thinking in chat_template_kwargs#109
fix(qwen): always send explicit enable_thinking in chat_template_kwargs#109LESdylan wants to merge 1 commit into
Conversation
When enable_thinking=false the payload previously omitted chat_template_kwargs entirely, leaving thinking mode to the vLLM server / chat-template default — which varies across deployments and made runs hard to reproduce (microsoft#90). Send an explicit true/false always, matching the MiniMax backend's existing behavior. Ref microsoft#90
|
@LESdylan please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
Thanks for this fix — the behavior is valuable and we would like to land it through your original PR so your contribution remains fully attributed. Current
We tested that combined resolution locally: the Qwen tests and the full suite pass. Suggested verification: pytest tests/test_qwen_backend.py -q
pytest tests/ -qThe CLA check is also still waiting for your response to the policy bot. Once rebased, CLA-complete, and green, this should be a good merge candidate. Please ping us after updating; we are happy to re-review promptly. |
Problem
skillopt/model/qwen_backend.pyonly attachedchat_template_kwargswhenenable_thinkingwas true:With
enable_thinking=falsethe key was omitted entirely, so whether Qwen thinking mode ran was decided by the vLLM server / chat-template default — which varies across deployments and makes results hard to reproduce. This is exactly point 3 of #90, where @Huangzisu confirmed the reported results used client-sideenable_thinking=falseand that the code would be adjusted.Change
Always send an explicit boolean:
This matches the MiniMax backend, which already sends the flag unconditionally (
minimax_backend.py).Tests
Updated the two tests that pinned the omit-when-disabled behavior to assert an explicit
{"enable_thinking": False}instead. Full suite: 165 passed, 5 skipped.Ref #90