Skip to content

Support non-thinking mode for DeepSeek V4 Flash in Provider API #697

Closed

Description

@cr-zhichen

Feature Description

Please add support for disabling reasoning / thinking when using deepseek/deepseek-v4-flash through the CommandCode Provider API.

DeepSeek V4 Flash natively supports both thinking and non-thinking modes, but I currently cannot find a way to enable non-thinking mode through:

POST /provider/v1/chat/completions

Using:

{ "reasoning_effort": "none" }

returns HTTP 400:

Invalid option: expected one of "low"|"medium"|"high"|"xhigh"|"max"

Using DeepSeek's native parameter:

{ "thinking": { "type": "disabled" } }

succeeds, but the model still performs reasoning and reports reasoning tokens, so the parameter appears to be ignored or not forwarded upstream.

Please expose a true non-thinking option for models that support it natively. Any of these API shapes would work:

  • { "reasoning_effort": "none" }
  • { "thinking": { "type": "disabled" } }
  • A CommandCode-specific option such as { "reasoning_effort": "off" }

The important part is that DeepSeek V4 Flash actually runs in native non-thinking mode and produces no reasoning tokens.

Use Case

I use DeepSeek V4 Flash for simple workloads where reasoning is unnecessary, including:

  • Translation
  • Text rewriting
  • Classification
  • Information extraction
  • Formatting
  • Simple structured-output tasks

For these workloads, reasoning adds unnecessary latency and token usage without improving the result.

For example, I use the CommandCode Provider API as the backend for a translation model. Translation requests are usually straightforward and should return translated text directly, but DeepSeek V4 Flash currently spends reasoning tokens before producing the translation.

Being able to disable thinking would make the model significantly more suitable for latency-sensitive and high-volume workloads.

Additional Context

Endpoint

https://api.commandcode.ai/provider/v1/chat/completions

Model

deepseek/deepseek-v4-flash

Reproduction 1

Request:

{
  "model": "deepseek/deepseek-v4-flash",
  "messages": [
    {
      "role": "user",
      "content": "Translate this text directly."
    }
  ],
  "reasoning_effort": "none"
}

Response:

{
  "error": {
    "message": "Invalid option: expected one of \"low\"|\"medium\"|\"high\"|\"xhigh\"|\"max\"",
    "type": "invalid_request_error",
    "param": "reasoning_effort"
  }
}

Reproduction 2

Request:

{
  "model": "deepseek/deepseek-v4-flash",
  "messages": [
    {
      "role": "user",
      "content": "Translate this text directly."
    }
  ],
  "thinking": {
    "type": "disabled"
  }
}

The request succeeds, but reasoning tokens are still generated.

DeepSeek's native API supports switching V4 Flash between thinking and non-thinking modes, so it would be helpful if the CommandCode Provider API exposed the same capability.

How important is this to you?

Important for my workflow

Activity

  1. vipulgupta2048 commented on Aug 18, 2026

    @vipulgupta2048
    Contributor

    Thanks for the feedback, @cr-zhichen will add this to the roadmap. Some models will by default have a thinking level set. So, even if you send none for thinking, it will still be processing thinking tokens.

  2. Hangsiin commented on Aug 22, 2026

    @Hangsiin

    Yeah, please fix this issue as soon as possible. I think disabling thinking was possible yesterday, but it's not working again today. It's really annoying. I don't think it should be that difficult of a problem.

  3. ahmadbilaldev commented on Sep 7, 2026

    @ahmadbilaldev
    Contributor

    @cr-zhichen @Hangsiin I have shipped a fix for this one. Please retry and thanks for reporting this.

  4. Hangsiin commented on Sep 8, 2026

    @Hangsiin

    Retested on September 9, 2026, after the fix announcement above. Unfortunately, non-thinking mode still does not work in the Provider API requests tested here.

    Environment

    • Direct HTTP POST to https://api.commandcode.ai/provider/v1/chat/completions
    • Model: deepseek/deepseek-v4-flash (also confirmed in response model)
    • No Command Code CLI or SDK involved; no CLI-version header sent
    • Both with and without x-cmd-zdr: 1

    Minimal reproduction

    {
      "model": "deepseek/deepseek-v4-flash",
      "messages": [
        {
          "role": "user",
          "content": "Translate to Korean. Output only the translation: The meeting starts tomorrow at three in the afternoon."
        }
      ],
      "max_tokens": 256,
      "thinking": { "type": "disabled" }
    }

    Observed HTTP 200, but the response contained both non-empty message.reasoning and nonzero usage.completion_tokens_details.reasoning_tokens:

    • Without ZDR header: 93 reasoning tokens, 108 completion tokens.
    • With x-cmd-zdr: 1: 51 reasoning tokens, 66 completion tokens.

    Both returned a visible Korean translation. This is not merely a missing/ambiguous usage field: reasoning text was present too.

    Using reasoning_effort: "none" or "off" instead still returns HTTP 400:

    Invalid option: expected one of "low"|"medium"|"high"|"xhigh"|"max"
    

    Other tested shapes (reasoning: {enabled: false}, reasoning: {effort: "none"}, enable_thinking: false, thinking: false, and thinking: {enabled: false}) also returned reasoning tokens, with and without ZDR.

    Repeated OFF / low / xhigh comparison

    Same prompt and settings within each workload, three independent calls per setting, max_tokens: 4096, ZDR enabled, non-streaming. OFF means thinking: {type: "disabled"}; the other settings use reasoning_effort with no thinking field.

    Each cell below is mean reasoning tokens / mean end-to-end request seconds:

    Workload OFF requested low xhigh
    Short translation above 114 / 3.86s 71 / 2.93s 155.7 / 3.75s
    Forced strict function call (value: 37, label: "control") 31.7 / 5.50s 18.7 / 3.60s 36.7 / 3.67s
    Compute 987654321 * 123456789. Output only the exact integer answer. 2196 / 14.14s 3032.3 / 18.30s 2264 / 13.58s

    All 9 OFF-requested calls returned nonzero reasoning tokens and non-empty reasoning text. All 27 comparison calls returned HTTP 200. For the arithmetic workload, one call in each setting hit the 4096-token cap with no visible answer; the other two returned the correct integer. The capped samples and small sample size mean this is not a general performance ranking of low versus xhigh.

    Could you please confirm:

    1. Is the fix deployed to /provider/v1/chat/completions for this exact model, including both ZDR and default upstream routing?
    2. What is the exact supported request body for native non-thinking mode after the fix? Is any additional header or different model ID required?
    3. Could this issue be reopened if the original thinking.type: "disabled" request is still intended to work?

    Related: #776 remains open, and the later comment in #726 says the ability to turn off reasoning is being added. Clarifying whether non-thinking support has shipped separately from the reasoning echo-back fix would help.

    Only synthetic test prompts and aggregate measurements are included here; no credentials or private application data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions