Commit 69ef3f5
fix: filter extra fields from tool_use blocks to prevent Anthropic API rejection
Anthropic's API returns a `caller` field in `tool_use` response blocks
but rejects this field when sent back in subsequent requests. This
filters `tool_use` blocks to only include accepted fields: `type`, `id`,
`name`, and `input`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 0ec5197 commit 69ef3f5
1 file changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
283 | 285 | | |
284 | 286 | | |
285 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
286 | 297 | | |
287 | 298 | | |
288 | 299 | | |
| |||
293 | 304 | | |
294 | 305 | | |
295 | 306 | | |
296 | | - | |
297 | 307 | | |
298 | 308 | | |
299 | | - | |
| 309 | + | |
| 310 | + | |
300 | 311 | | |
301 | 312 | | |
302 | 313 | | |
| |||
0 commit comments