Skip to content

[Bug] [thinking] enabled=false 对第三方 OpenAI 兼容供应商不生效(DeepSeek 仍默认思考) || [Bug] [thinking] enabled=false does not take effect for third-party OpenAI compatible vendors (DeepSeek still defaults to thinking) #2484

Description

@lin200083

问题描述

当在 中配置第三方 OpenAI 兼容供应商(如 DeepSeek V4 Flash via Sensenova)时, 无法关闭模型的思考模式。模型仍然会输出推理过程。

复现步骤

  1. 在 config.toml 中配置第三方 OpenAI 兼容供应商:

    [providers.my-provider]
    type = "openai"
    base_url = "https://xxx/v1"
    api_key = "sk-xxx"
    
    [models.my-model]
    provider = "my-provider"
    model = "deepseek-v4-flash"
    max_context_size = 1048576
    capabilities = ["thinking"]
    
    [thinking]
    enabled = false
  2. 启动 CLI,向模型发送消息

  3. 模型仍然输出推理内容(reasoning_content)

根因分析

DeepSeek V4 Flash 默认启用思考模式,其 API 参数 reasoning_effort 缺省值为 "medium"。当 CLI 的 [thinking] enabled = false 时,CLI 只是不发送 reasoning_effort 参数,而非显式传递 reasoning_effort: "none"。结果 DeepSeek 服务端收不到该参数,就按自身默认值继续思考。

尝试过的方案(均无效)

  1. 设置 effort = "none" — CLI 未将 "none" 透传给 API
  2. 移除 capabilities = ["thinking"]" + enabled = false` — CLI 完全不参与思考参数,DeepSeek 仍按默认值思考
  3. 设置 support_efforts = ["low", "medium", "high", "none"]" + default_effort = "none"` — 同样未生效

期望行为

[thinking] enabled = false 时,对于 OpenAI 兼容供应商,CLI 应在请求体中显式传递 reasoning_effort: "none",而非省略该参数。

或者,当 effort = "none" 时,CLI 应将 "none" 值透传给供应商 API。

环境信息

  • Kimi Code CLI 版本:latest
  • 供应商:Sensenova(OpenAI 兼容)→ DeepSeek V4 Flash
  • 操作系统:Windows

Problem description

When configuring a third-party OpenAI compatible vendor (such as DeepSeek V4 Flash via Sensenova) in , it is not possible to turn off the think mode of the model. The model still outputs the inference process.

Reproduction steps

  1. Configure third-party OpenAI compatible providers in config.toml:

    [providers.my-provider]
    type = "openai"
    base_url = "https://xxx/v1"
    api_key = "sk-xxx"
    
    [models.my-model]
    provider = "my-provider"
    model = "deepseek-v4-flash"
    max_context_size = 1048576
    capabilities = ["thinking"]
    
    [thinking]
    enabled = false
  2. Start the CLI and send messages to the model

  3. The model still outputs reasoning content (reasoning_content)

Root cause analysis

DeepSeek V4 Flash enables thinking mode by default, and its API parameter reasoning_effort has a default value of "medium". When the CLI's [thinking] enabled = false, the CLI simply doesn't send the reasoning_effort parameter** instead of explicitly passing reasoning_effort: "none". As a result, the DeepSeek server did not receive this parameter and continued to think according to its default value.

Tried solutions (all invalid)

  1. Set effort = "none" — CLI does not pass "none" through to API
  2. Remove capabilities = ["thinking"]" + enabled = false` - CLI does not participate in thinking parameters at all, DeepSeek still thinks according to the default value
  3. Set support_efforts = ["low", "medium", "high", "none"]" + default_effort = "none"` — also does not take effect

Desired behavior

When [thinking] enabled = false, for OpenAI compatible vendors, the CLI should explicitly pass reasoning_effort: "none" in the request body instead of omitting this parameter.

Alternatively, when effort = "none", the CLI should transparently pass the "none" value to the vendor API.

Environment information

  • Kimi Code CLI version: latest
  • Supplier: Sensenova (OpenAI compatible) → DeepSeek V4 Flash
  • Operating system: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions