Files
codex/codex-rs
Sean Huang db9778b73c Distinguish image and tool audio attachment uploads (#62047)
## What changed

Introduce `UploadContent::Image` and `UploadContent::ToolAudio` in `UploadRequest`. Keep image filenames and policy tags on the image variant, and carry tool audio's declared MIME type explicitly instead of encoding its type and MIME metadata in tags.

Update image preparation, image generation, and tool audio callers to use the typed content. Preserve inline bytes for both variants and redact their payloads from debug output. Document that persistent backends must verify the declared audio MIME type against the uploaded bytes.

## Testing

Add coverage for inline tool audio byte preservation and audio debug redaction. Update integration assertions for typed image and audio uploads, and verify that Code Mode does not upload audio when `FileBackedToolAudio` is disabled.

GitOrigin-RevId: 7dbd69922b377aead2dc28d1e5b3938cce6343b7
2026-11-17 13:38:34 +00:00
..
…
…
…
…