Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ describe('token plan provider', () => {
'qwen3.7-plus',
'qwen3.6-plus',
'qwen3.7-max',
'qwen3.8-max',
'qwen3.8-max-preview',
'qwen3.6-flash',
'deepseek-v4-pro',
Expand Down Expand Up @@ -72,6 +73,14 @@ describe('token plan provider', () => {
template.find((model) => model.id === 'qwen3.6-plus')?.generationConfig
?.modalities,
).toEqual({ image: true, video: true });
expect(
template.find((model) => model.id === 'qwen3.8-max')?.generationConfig,
).toEqual({
extra_body: { enable_thinking: true },
thinkingMandatory: true,
contextWindowSize: 1000000,
modalities: { image: true, video: true },
});
expect(
template.find((model) => model.id === 'qwen3.8-max-preview')
?.generationConfig?.modalities,
Expand Down
7 changes: 7 additions & 0 deletions packages/core/src/providers/presets/alibaba-token-plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ const TOKEN_PLAN_MODELS: ModelSpec[] = [
modalities: { image: true, video: true },
},
{ id: 'qwen3.7-max', contextWindowSize: 1000000, enableThinking: true },
{
id: 'qwen3.8-max',
contextWindowSize: 1000000,
enableThinking: true,
thinkingMandatory: true,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Critical] Stable qwen3.8-max supports hybrid thinking, but this preset marks it as mandatory. When a Token Plan user explicitly disables reasoning through includeThoughts: false, reasoning: false, ACP/WebShell settings, or enable_thinking: false, this flag makes the pipeline bypass its normal reasoning_effort: 'none' path and send thinking enabled anyway. Remove thinkingMandatory: true from the stable entry and keep it only for qwen3.8-max-preview.

Witness from an isolated probe:

PR preset: qwen3.8-max request contained enable_thinking: true and no reasoning_effort after an explicit opt-out
After removing thinkingMandatory: the same request emitted reasoning_effort: 'none' and passed
中文说明

稳定版 qwen3.8-max 支持混合思考模式,但该预置将其标记为强制思考。当 Token Plan 用户通过 includeThoughts: falsereasoning: false、ACP/WebShell 设置或 enable_thinking: false 明确关闭推理时,此标志会使管线绕过正常的 reasoning_effort: 'none' 路径,仍然发送启用思考的请求。请从稳定版条目移除 thinkingMandatory: true,仅在 qwen3.8-max-preview 上保留。

隔离探针结果:稳定版预置在明确关闭推理后仍发送 enable_thinking: true 且没有 reasoning_effort;移除 thinkingMandatory 后,同一请求发送 reasoning_effort: 'none' 并通过。

Please add a preset-derived stable-model test where includeThoughts: false must emit reasoning_effort: 'none', then remove the fix and confirm that test fails.

— gpt-5.6-sol via Qwen Code /review (v0.22.0)

modalities: { image: true, video: true },
},
{
id: 'qwen3.8-max-preview',
contextWindowSize: 1000000,
Expand Down
Loading