Skip to content

DeepSeek V4 Flash: xhigh reasoning effort silently clamped to high #3787

Description

@gojack10

What happened?

supportsXhigh() in packages/ai/src/models.ts does not recognize deepseek-v4-flash, so xhigh is silently clamped to high before reaching the provider. This mirrors #3662 (Pro), fixed in b4e93feb. Empirical testing shows Flash supports the higher tier too.

Steps to reproduce

pi --provider openrouter --model deepseek/deepseek-v4-flash --thinking xhigh -p "Say: ok"

Session JSONL shows the silent downgrade:

{"type": "thinking_level_change", "thinkingLevel": "xhigh"}
{"type": "thinking_level_change", "thinkingLevel": "high"}

Direct OpenRouter API comparison on an identical prompt to deepseek/deepseek-v4-flash, varying only reasoning.effort:

effort HTTP reasoning_tokens
minimal 200 226
low 200 266
medium 200 297
high 200 293
xhigh 200 1238 (4.2× the high baseline)
max 400 rejected — Invalid option: expected one of xhigh|high|medium|low|minimal|none

The bimodal distribution (minimal–high cluster within ±15%, xhigh jumps 4×) indicates DeepSeek upstream coerces minimal/low/medium to high and treats xhigh as a strictly higher tier. The 400 on max confirms xhigh is the canonical OpenRouter name.

Expected behavior

supportsXhigh() returns true for deepseek-v4-flash, mirroring the existing deepseek-v4-pro check.

Version

0.70.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions