Files
codex/codex-rs
cassirer-openai 7656a23b8d Preserve incomplete response output in failed inference traces (#58456)
## Why

When a response fails with incomplete output, attempted tool calls can appear only in the terminal response payload. Failed inference traces previously omitted those items, losing evidence of the attempted call.

## What changed

Retain output items marked `incomplete` on `ResponseIncompleteError` and include recognized items in failed inference traces, deduplicating by item ID. Keep these items out of streamed output, tool dispatch, and the continuation cache, and omit their payloads from the error's debug representation.

## Testing

Add tests for retaining only incomplete output from terminal responses and recording attempted calls in failed traces without streaming them or creating tool calls. Cover unknown response item types being skipped.

GitOrigin-RevId: 594f6a37a5af543694f19fcffe0c164cb2addb36
2026-10-30 23:55:47 +00:00
..
…
…
…
…