Skip to content

[codex] add deferred image content apis - #21110

Closed
rhan-oai wants to merge 2 commits into
mainfrom
rhan/large-content
Closed

rhan-oai wants to merge 2 commits into
mainfrom
rhan/large-content

Conversation

@rhan-oai

@rhan-oai rhan-oai commented May 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add an image-generation large-content model with inline and deferred variants while preserving the legacy result field
  • add experimental thread/turns/items/list and thread/item/content/read APIs
  • allow history responses to return deferred generated-image metadata via largeContent: "deferred"

Why

Generated image results can be multi-megabyte base64 payloads. This adds the API surface needed to keep those bytes out of thread-history responses while still letting clients fetch the image contents on demand.

Details

  • ImageGeneration.content is now a structured tagged union; old clients can continue reading result
  • deferred image items return contentId: "result" plus metadata and leave result empty
  • thread/turns/items/list pages one turn's items
  • thread/item/content/read returns the deferred image bytes for a specific thread/turn/item/content tuple
  • running-thread resume responses now honor largeContent the same way as the normal resume path

Validation

  • cargo test -p codex-app-server-protocol
  • cargo test -p codex-app-server
  • just fmt
  • just write-app-server-schema
  • just write-app-server-schema --experimental
  • just fix -p codex-app-server-protocol
  • just fix -p codex-app-server

@rhan-oai
rhan-oai force-pushed the rhan/large-content branch 2 times, most recently from 6223db6 to fb751d6 Compare May 6, 2026 17:19
@rhan-oai
rhan-oai force-pushed the rhan/large-content branch from fb751d6 to 2c67f7b Compare May 7, 2026 18:20
@github-actions

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant