Commit acdeee3
Fix double-stringification of toolOutput in OpenAI transport
Handle different shapes of toolOutput from ChatGPT:
- Array of content blocks: use directly
- Single content block {type, text}: wrap in array
- Object with just {text}: extract and wrap
- Other: stringify as fallback
This prevents double-stringification when ChatGPT passes content
in different formats.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 25e7e43 commit acdeee3
1 file changed
+29
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
501 | 529 | | |
502 | 530 | | |
503 | 531 | | |
504 | 532 | | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
| 533 | + | |
513 | 534 | | |
514 | 535 | | |
515 | 536 | | |
| |||
0 commit comments