fix: preserve reasoning_content in anthropic-messages transport for p… · openclaw/openclaw@8e21b3c
Sunnyone2thr
·
2026-05-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -386,10 +386,10 @@ function convertAnthropicMessages(
|
386 | 386 | } |
387 | 387 | } |
388 | 388 | if (blocks.length > 0) { |
389 | | -params.push({ |
390 | | - role: "assistant", |
391 | | -content: blocks, |
392 | | -}); |
| 389 | +const assistantMsg: Record<string, unknown> = { role: "assistant", content: blocks }; |
| 390 | +if (typeof msg.reasoning_content === "string" && msg.reasoning_content.length > 0) |
| 391 | +assistantMsg.reasoning_content = msg.reasoning_content; |
| 392 | +params.push(assistantMsg); |
393 | 393 | } |
394 | 394 | continue; |
395 | 395 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。