qwen-code/docs
易良 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
..
assets feat: support workspace display names (#7179) 2026-07-20 15:16:44 +00:00
design fix(session): preserve source titles when branching (#9764) 2026-08-25 06:47:34 +00:00
developers feat(desktop): remove packages/desktop after OpenWork fork; keep the Tauri upgrade bridge (#9085) 2026-08-25 05:26:11 +00:00
e2e-tests fix(cli): Recover sessions across archive races (#9513) 2026-08-22 14:01:59 +00:00
images fix(web-shell): render built-in tag icons (#7024) 2026-07-17 15:33:34 +00:00
plans feat(computer-use): replace built-in tools with bundled skill (#9856) 2026-08-24 11:05:23 +00:00
superpowers feat(cli): reference prior sessions via @ and add completion tabs (#7302) 2026-07-24 06:11:48 +00:00
users fix(core): emit OpenRouter's reasoning disable when thinking is off (#9758) 2026-08-25 07:43:08 +00:00
verification/abort-controller-refactor fix(core): stop AbortSignal listener leak in long sessions (MaxListenersExceededWarning) (#4366) 2026-05-26 14:21:49 +08:00
_meta.ts feat: refactor docs 2025-12-05 10:51:57 +08:00
index.md fix: lint issues 2025-12-19 15:52:11 +08:00