Skip to content

Route standalone image generation through host finalization md#25176

Open
won-openai wants to merge 1 commit into
mainfrom
extension_turn_itme
Open

Route standalone image generation through host finalization md#25176
won-openai wants to merge 1 commit into
mainfrom
extension_turn_itme

Conversation

@won-openai
Copy link
Copy Markdown
Collaborator

Why

Standalone image-generation extensions emitted turn items through the low-level event path, bypassing host-owned finalization such as image persistence and contributor processing. At the same time, the generated-image save-path hint must remain visible to the model through the extension tool's FunctionCallOutput, rather than the legacy built-in developer-message path.

What changed

  • Extended ExtensionTurnItem to support image-generation items while keeping the extension-facing emitter API limited to emit_started and emit_completed.
  • Routed extension completion through core finalize_turn_item, so standalone image-generation items receive host-owned processing and persisted saved_path values before publication.
  • Kept legacy built-in image generation on its existing developer-message hint path, while standalone image generation returns its deterministic saved-path hint in FunctionCallOutput.
  • Shared the image artifact path and output-hint formatting used by core and the image-generation extension.
  • Passed thread identity through extension tool calls so standalone image generation can construct the same intended artifact path as core.
  • Added an app-server integration test covering real standalone image generation, saved artifact publication, model-visible output hint wiring, and absence of the legacy developer-message hint.

Validation

  • just fmt
  • just test -p codex-image-generation-extension
  • just test -p codex-web-search-extension
  • just test -p codex-goal-extension
  • just test -p codex-memories-extension
  • Targeted codex-core tests for image save history, extension completion finalization, and contributor execution
  • just test -p codex-app-server standalone_image_generation_returns_saved_path_hint_to_model
  • just fix -p codex-core
  • just fix -p codex-image-generation-extension
  • just bazel-lock-update
  • just bazel-lock-check

@won-openai won-openai requested a review from a team as a code owner May 29, 2026 23:50
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