mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:10:45 +00:00
fix(deepseek): backfill v4 assistant reasoning replay
This commit is contained in:
@@ -84,17 +84,17 @@ calls can continue.
|
||||
## Thinking and tools
|
||||
|
||||
DeepSeek V4 thinking sessions have a stricter replay contract than most
|
||||
OpenAI-compatible providers: when a thinking-enabled assistant message includes
|
||||
tool calls, DeepSeek expects the prior assistant `reasoning_content` to be sent
|
||||
back on the follow-up request. OpenClaw handles this inside the DeepSeek plugin,
|
||||
so normal multi-turn tool use works with `deepseek/deepseek-v4-flash` and
|
||||
`deepseek/deepseek-v4-pro`.
|
||||
OpenAI-compatible providers: after a thinking-enabled turn uses tools, DeepSeek
|
||||
expects replayed assistant messages from that turn to include
|
||||
`reasoning_content` on follow-up requests. OpenClaw handles this inside the
|
||||
DeepSeek plugin, so normal multi-turn tool use works with
|
||||
`deepseek/deepseek-v4-flash` and `deepseek/deepseek-v4-pro`.
|
||||
|
||||
If you switch an existing session from another OpenAI-compatible provider to a
|
||||
DeepSeek V4 model, older assistant tool-call turns may not have native
|
||||
DeepSeek `reasoning_content`. OpenClaw fills that missing field for DeepSeek V4
|
||||
thinking requests so the provider can accept the replayed tool-call history
|
||||
without requiring `/new`.
|
||||
DeepSeek `reasoning_content`. OpenClaw fills that missing field on replayed
|
||||
assistant messages for DeepSeek V4 thinking requests so the provider can accept
|
||||
the history without requiring `/new`.
|
||||
|
||||
When thinking is disabled in OpenClaw (including the UI **None** selection),
|
||||
OpenClaw sends DeepSeek `thinking: { type: "disabled" }` and strips replayed
|
||||
|
||||
Reference in New Issue
Block a user