Repository navigation
fix: forward Qwen target timeout and gate enable_thinking for vLLM targets - #40
Merged
Yifan Yang (Yif-Yang) merged 1 commit intoJun 7, 2026
Conversation
Two bugs made local vLLM targets score acc=0.000: the router did not forward 'timeout' to the Qwen backend (so runs used the 300s default), and qwen_backend always injected chat_template_kwargs.enable_thinking, which non-Qwen vLLM servers reject or answer with <think> output and no <answer> tag. Forward timeout and only set the field when enabled. Closes microsoft#28 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Contributor
Author
|
Appreciate the merge, Yifan Yang (@Yif-Yang). Forwarding the Qwen target timeout and gating enable_thinking keeps vLLM runs predictable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes two interacting bugs that make SkillOpt report
acc=0.000across all rollouts when the target is a local OpenAI-compatible vLLM endpoint (the scenario in #28, which a collaborator diagnosed as an infra/format mismatch rather than a model capability gap).Bugs
chat_target()andchat_target_messages()inskillopt/model/__init__.pydispatched to the Qwen backend without passingtimeout, so every Qwen rollout silently used the 300s module default regardless of the run's configuredexec_timeout.enable_thinkinginjected unconditionally.qwen_backend.pyalways addedchat_template_kwargs: {enable_thinking: <bool>}to the payload. Non-Qwen vLLM servers either reject the unknown field or emit<think>...</think>reasoning with no<answer>...</answer>tag, so the evaluator extracts a reasoning line instead of the answer and scores it wrong.Fix
timeoutthrough both router functions to the Qwen backend.chat_template_kwargs.enable_thinkingwhenconfig.enable_thinkingis true, so the field is absent (and harmless to non-Qwen servers) in the default case.Testing
pytest tests/test_qwen_backend.py— 4 passedpytest(full suite) — 64 passedCloses #28
AI was used for assistance.