Commit 004e913
fix(agents): preserve thinking/redacted_thinking blocks in stripThoughtSignatures
stripThoughtSignatures removes thought_signature fields from content
blocks for cross-provider compatibility. However, it also modifies
thinking and redacted_thinking blocks, which Anthropic's API requires
to be identical to the original response. When these modified blocks
appear in the latest assistant message on a subsequent turn, the API
rejects the request with:
"thinking or redacted_thinking blocks in the latest assistant message
cannot be modified"
Skip thinking/redacted_thinking block types in stripThoughtSignatures
to preserve them unchanged.
Co-Authored-By: Claude Opus 4.6 <[email protected]>1 parent 5d51e99 commit 004e913
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
68 | 74 | | |
69 | 75 | | |
70 | 76 | | |
| |||
0 commit comments