feat(models): support reasoning_effort config for DeepSeek V4

This commit is contained in:
zhayujie
2026-05-15 18:17:35 +08:00
parent fe871aad77
commit f5479c56af
5 changed files with 73 additions and 19 deletions

View File

@@ -42,6 +42,24 @@ V4 系列(`deepseek-v4-flash` / `deepseek-v4-pro`)支持显式的"思考模
- `true`所有渠道下模型都会先思考再作答。Web 控制台会展示思考过程IM 渠道(微信 / 企微 / 钉钉 / 飞书)虽不展示但同样获得更好答案。
- `false`:关闭思考,响应更快,首字延迟更低。
### 推理强度
思考模式下可通过 `reasoning_effort` 控制推理强度:
```json
{
"enable_thinking": true,
"reasoning_effort": "high"
}
```
| 取值 | 适用场景 |
| --- | --- |
| `high`(默认) | 日常 Agent 任务,思考与速度的平衡 |
| `max` | 复杂编码、长链路规划、严格约束的任务,推理更深但耗时与输出 token 更多 |
`reasoning_effort` 仅在 `enable_thinking` 为 `true` 时生效;模型不支持思考模式时该字段自动忽略。
### 行为说明
- **采样参数**:思考模式下 `temperature`、`top_p`、`presence_penalty`、`frequency_penalty` 会被服务端忽略不会报错CowAgent 会自动跳过传入。