Skip to content

Store generated image items as attachment references - #54398

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f7a2bb5707e2f277348a547a988bc33c8e96d891
Oct 15, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f7a2bb5707e2f277348a547a988bc33c8e96d891

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Store generated image items as attachment references

What changed

  • Upload generated images to the attachment store and expose fileId in image-generation items when available, with inline result fallback on upload or decoding failure.
  • Preserve file references through legacy events, persisted rollouts, thread history, and task output summaries. Keep model-facing image preparation separate.
  • Add attachment request tags and mark generated-image uploads with usage=image_gen, preserving the thread's ephemeral setting.
  • Update public schemas and SDK types to accept either image representation, retain the Python ImageGenerationThreadItem alias, and prefer fileId when reading records containing both fields.

Testing

Add coverage for file-backed generation and rollout persistence, legacy history replay, inline and transitional serialization, task output visibility, and Python SDK alias compatibility.

## What changed

- Upload generated images to the attachment store and expose `fileId` in image-generation items when available, with inline `result` fallback on upload or decoding failure.
- Preserve file references through legacy events, persisted rollouts, thread history, and task output summaries. Keep model-facing image preparation separate.
- Add attachment request tags and mark generated-image uploads with `usage=image_gen`, preserving the thread's ephemeral setting.
- Update public schemas and SDK types to accept either image representation, retain the Python `ImageGenerationThreadItem` alias, and prefer `fileId` when reading records containing both fields.

## Testing

Add coverage for file-backed generation and rollout persistence, legacy history replay, inline and transitional serialization, task output visibility, and Python SDK alias compatibility.

GitOrigin-RevId: f7a2bb5707e2f277348a547a988bc33c8e96d891
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/f7a2bb5707e2f277348a547a988bc33c8e96d891 branch from eab910c to aabf133 Compare October 15, 2026 19:51
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-15T19:51:35.235244Z eab910c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@copyberry
copyberry Bot merged commit aabf133 into main Oct 15, 2026
1 check failed
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/f7a2bb5707e2f277348a547a988bc33c8e96d891 branch October 15, 2026 19:51
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 15, 2026
@israelazo
israelazo deployed to issue-triage October 15, 2026 19:53 — with GitHub Actions Active
@israelazo
israelazo deployed to issue-triage October 15, 2026 19:53 — with GitHub Actions Active
@israelazo
israelazo deployed to issue-triage October 15, 2026 19:53 — with GitHub Actions Active
@Chris0Jeky
Chris0Jeky deployed to issue-triage October 15, 2026 19:58 — with GitHub Actions Active
@Chris0Jeky
Chris0Jeky deployed to issue-triage October 15, 2026 19:58 — with GitHub Actions Active
@Chris0Jeky
Chris0Jeky deployed to issue-triage October 15, 2026 19:58 — with GitHub Actions Active
@Chris0Jeky
Chris0Jeky deployed to issue-triage October 15, 2026 19:59 — with GitHub Actions Active

This branch was successfully deployed

1 active deployment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants