Skip to content

Enable image generation continuation#22223

Open
nm-openai wants to merge 1 commit into
mainfrom
nm-codex/image-gen-continuation
Open

Enable image generation continuation#22223
nm-openai wants to merge 1 commit into
mainfrom
nm-codex/image-gen-continuation

Conversation

@nm-openai
Copy link
Copy Markdown

Summary

  • continue sampling once after a successful image_generation_call so workflows can produce requested final text or artifact metadata alongside the image
  • add a stable default-on image_generation_continuation feature flag so callers can opt out
  • include saved image metadata in model-visible history and cover both default and disabled behavior in tests

Original ticket: https://www.notion.so/openai/Allow-image_gen-workflows-to-provide-post-generation-text-or-artifact-metadata-35d8e50b62b0817cadcafa1056c6e41c?source=copy_link

Tests

  • just write-config-schema
  • just fmt
  • cargo test -p codex-features image_generation_continuation_is_stable_and_enabled_by_default
  • cargo test -p codex-core image_generation
  • just fix -p codex-core
  • just fix -p codex-features

@nm-openai nm-openai requested a review from a team as a code owner May 11, 2026 23:03
@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.

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b861e9ea81

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if let Some(revised_prompt) = self.revised_prompt.as_deref()
&& !revised_prompt.is_empty()
{
body.push_str(&format!("\n- revised_prompt: {revised_prompt}"));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Escape revised_prompt before developer injection

revised_prompt is model/service output derived from the user's image request, but it is concatenated directly into a developer-role message. A prompt containing newlines or instructions is replayed on the continuation with developer priority, elevating untrusted text above the user. Store it as quoted/structured metadata or otherwise delimit/escape it.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant