问题描述
当在 中配置第三方 OpenAI 兼容供应商(如 DeepSeek V4 Flash via Sensenova)时, 无法关闭模型的思考模式。模型仍然会输出推理过程。
复现步骤
-
在 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
-
启动 CLI,向模型发送消息
-
模型仍然输出推理内容(reasoning_content)
根因分析
DeepSeek V4 Flash 默认启用思考模式,其 API 参数 reasoning_effort 缺省值为 "medium"。当 CLI 的 [thinking] enabled = false 时,CLI 只是不发送 reasoning_effort 参数,而非显式传递 reasoning_effort: "none"。结果 DeepSeek 服务端收不到该参数,就按自身默认值继续思考。
尝试过的方案(均无效)
- 设置
effort = "none" — CLI 未将 "none" 透传给 API
- 移除
capabilities = ["thinking"]" + enabled = false` — CLI 完全不参与思考参数,DeepSeek 仍按默认值思考
- 设置
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
-
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
-
Start the CLI and send messages to the model
-
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)
- Set
effort = "none" — CLI does not pass "none" through to API
- Remove
capabilities = ["thinking"]" + enabled = false` - CLI does not participate in thinking parameters at all, DeepSeek still thinks according to the default value
- 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
问题描述
当在 中配置第三方 OpenAI 兼容供应商(如 DeepSeek V4 Flash via Sensenova)时, 无法关闭模型的思考模式。模型仍然会输出推理过程。
复现步骤
在 config.toml 中配置第三方 OpenAI 兼容供应商:
启动 CLI,向模型发送消息
模型仍然输出推理内容(reasoning_content)
根因分析
DeepSeek V4 Flash 默认启用思考模式,其 API 参数
reasoning_effort缺省值为"medium"。当 CLI 的[thinking] enabled = false时,CLI 只是不发送reasoning_effort参数,而非显式传递reasoning_effort: "none"。结果 DeepSeek 服务端收不到该参数,就按自身默认值继续思考。尝试过的方案(均无效)
effort = "none"— CLI 未将 "none" 透传给 APIcapabilities = ["thinking"]" +enabled = false` — CLI 完全不参与思考参数,DeepSeek 仍按默认值思考support_efforts = ["low", "medium", "high", "none"]" +default_effort = "none"` — 同样未生效期望行为
当
[thinking] enabled = false时,对于 OpenAI 兼容供应商,CLI 应在请求体中显式传递reasoning_effort: "none",而非省略该参数。或者,当
effort = "none"时,CLI 应将 "none" 值透传给供应商 API。环境信息
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
Configure third-party OpenAI compatible providers in config.toml:
Start the CLI and send messages to the model
The model still outputs reasoning content (reasoning_content)
Root cause analysis
DeepSeek V4 Flash enables thinking mode by default, and its API parameter
reasoning_efforthas a default value of"medium". When the CLI's[thinking] enabled = false, the CLI simply doesn't send thereasoning_effortparameter** instead of explicitly passingreasoning_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)
effort = "none"— CLI does not pass "none" through to APIcapabilities = ["thinking"]" +enabled = false` - CLI does not participate in thinking parameters at all, DeepSeek still thinks according to the default valuesupport_efforts = ["low", "medium", "high", "none"]" +default_effort = "none"` — also does not take effectDesired behavior
When
[thinking] enabled = false, for OpenAI compatible vendors, the CLI should explicitly passreasoning_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