fix(model): forward Qwen timeout and only set enable_thinking when true

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 #28

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt Van Horn
2026-06-07 07:41:35 -07:00
parent ee9931ec01
commit c31c50be51
3 changed files with 231 additions and 1 deletions
+2 -1
View File
@@ -191,7 +191,8 @@ def _chat_messages_impl(
"messages": _json_safe(messages),
"max_tokens": min(max_completion_tokens, config.max_tokens),
}
payload["chat_template_kwargs"] = {"enable_thinking": config.enable_thinking}
if config.enable_thinking:
payload["chat_template_kwargs"] = {"enable_thinking": True}
if config.temperature is not None:
payload["temperature"] = config.temperature
if tools: