mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
feat(models): support reasoning_effort config for DeepSeek V4
This commit is contained in:
@@ -42,6 +42,24 @@ Controlled by the global `enable_thinking` setting:
|
||||
- `true`: thinking is on across all channels. The Web console renders the reasoning trace; IM channels (WeChat / WeCom / DingTalk / Feishu) don't render it but still benefit from higher answer quality.
|
||||
- `false`: thinking off, faster responses with lower first-token latency.
|
||||
|
||||
### Reasoning Effort
|
||||
|
||||
Under thinking mode, `reasoning_effort` controls how hard the model thinks:
|
||||
|
||||
```json
|
||||
{
|
||||
"enable_thinking": true,
|
||||
"reasoning_effort": "high"
|
||||
}
|
||||
```
|
||||
|
||||
| Value | Use Case |
|
||||
| --- | --- |
|
||||
| `high` (default) | Day-to-day agent tasks; balanced thinking depth and latency |
|
||||
| `max` | Complex coding, long-horizon planning, strict-constraint tasks. Deeper reasoning at the cost of more output tokens and higher latency |
|
||||
|
||||
`reasoning_effort` only takes effect when `enable_thinking` is `true`. It is silently ignored on models that do not support thinking mode.
|
||||
|
||||
### Notes
|
||||
|
||||
- **Sampling parameters**: under thinking mode, `temperature`, `top_p`, `presence_penalty`, and `frequency_penalty` are silently ignored by the server (no error). CowAgent skips sending them automatically.
|
||||
|
||||
@@ -42,6 +42,24 @@ V4シリーズ(`deepseek-v4-flash` / `deepseek-v4-pro`)は明示的な「思
|
||||
- `true`:すべてのチャネルで思考モードがオン。Webコンソールでは思考過程を表示し、IMチャネル(WeChat / WeCom / DingTalk / Feishu)では表示されないものの、回答品質の向上というメリットを得られます。
|
||||
- `false`:思考オフ、応答が速く、初回トークンの遅延も低くなります。
|
||||
|
||||
### 推論強度
|
||||
|
||||
思考モード下では `reasoning_effort` で推論の深さを制御できます:
|
||||
|
||||
```json
|
||||
{
|
||||
"enable_thinking": true,
|
||||
"reasoning_effort": "high"
|
||||
}
|
||||
```
|
||||
|
||||
| 値 | 適用シーン |
|
||||
| --- | --- |
|
||||
| `high`(デフォルト) | 通常の Agent タスク、思考の深さとレスポンス速度のバランス |
|
||||
| `max` | 複雑なコーディング、長いプランニング、厳密な制約のあるタスク。より深い推論と引き換えに出力トークンとレイテンシが増加 |
|
||||
|
||||
`reasoning_effort` は `enable_thinking` が `true` の場合のみ有効になります。思考モードをサポートしないモデルでは自動的に無視されます。
|
||||
|
||||
### 注意事項
|
||||
|
||||
- **サンプリングパラメータ**:思考モード時は `temperature`、`top_p`、`presence_penalty`、`frequency_penalty` がサーバ側で無視されます(エラーにはなりません)。CowAgentは自動的に送信をスキップします。
|
||||
|
||||
@@ -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 会自动跳过传入。
|
||||
|
||||
Reference in New Issue
Block a user