qwen-code/packages
易良 bd42e67137
fix(core): emit OpenRouter's reasoning disable when thinking is off (#9758)
* fix(core): emit OpenRouter's reasoning disable when thinking is off

The AUTO-mode permission classifier's stage-1 side query forces a
respond_in_schema tool call (tool_choice: 'required') with a 256-token
budget and includeThoughts: false. On OpenRouter endpoints the
thinking-disable rendered only into shapes the gateway ignores
(chat_template_kwargs.enable_thinking for qwen-family models), and the
pipeline's unconditional strip then removed the `reasoning` object —
OpenRouter's native thinking knob. Thinking stayed on, the model spent
the whole budget on reasoning, never emitted the tool call, and the
classifier fail-closed with "Classifier stage 1 unavailable" (#9757).

Mirror the isDeepSeekHostname precedent: hostname-gated detection
(openrouter.ai / *.openrouter.ai) and emit `reasoning: { enabled: false }`
in the reasoningDisabled branch after the strip — the provider
buildRequest hook runs before the strip, so emitting earlier would be
removed again. Applied endpoint-wide rather than qwen-family-gated:
`reasoning` is an OpenRouter provider-level parameter, unlike
`enable_thinking`, which is a qwen wire field that leaks upstream on
non-qwen routings. thinkingMandatory models stay exempt; DashScope
(both shapes), vLLM/SGLang, DeepSeek hostname, and the official OpenAI
endpoint are untouched.

Repro + regression coverage added in pipeline.test.ts (red before the
fix, green after).

* test(core): cover OpenRouter reasoning guard
2026-08-25 07:43:08 +00:00
..
acp-bridge feat(daemon): add ACP channel transport liveness (#9976) 2026-08-25 06:29:07 +00:00
audio-capture chore(release): v0.22.0 (#9736) 2026-08-22 15:23:02 +00:00
channels fix(channels/qqbot): key the cron textChunk guard on active prompts, not streamState (#9971) 2026-08-25 07:37:59 +00:00
chrome-extension feat(serve): add --open-with-auth (#9738) 2026-08-24 07:33:05 +00:00
cli fix(cli): mark estimated compression token counts in banners (#9568) 2026-08-25 07:42:31 +00:00
core fix(core): emit OpenRouter's reasoning disable when thinking is off (#9758) 2026-08-25 07:43:08 +00:00
cua-driver feat(cua-driver): add versioned Computer Use SDK and release pipeline (#9587) 2026-08-23 14:20:14 +00:00
desktop-shell feat: consolidate Local Control into one daemon-owned implementation (#9106) 2026-08-17 16:44:48 +00:00
mobile-mcp chore(deps): Clear high-severity CVE baseline and harden the security gate (#9584) 2026-08-21 07:43:32 +00:00
node-repl feat(computer-use): replace built-in tools with bundled skill (#9856) 2026-08-24 11:05:23 +00:00
sdk-java refactor: centralize approval mode contracts (#9796) 2026-08-24 07:46:50 +00:00
sdk-python refactor: centralize approval mode contracts (#9796) 2026-08-24 07:46:50 +00:00
sdk-typescript fix(goal): resume an evidence-limited Goal from a fresh window (#9840) 2026-08-25 05:30:42 +00:00
vscode-ide-companion feat(review): run the reviewed repository's own commands behind a container (#9556) (#9723) 2026-08-25 01:58:18 +00:00
web-shell feat(channels): add DingTalk Workspace channel (#9394) 2026-08-25 06:40:47 +00:00
web-templates chore(release): v0.22.0 (#9736) 2026-08-22 15:23:02 +00:00
webui fix(goal): resume an evidence-limited Goal from a fresh window (#9840) 2026-08-25 05:30:42 +00:00
zed-extension