Skip to content

responses: expose image generation output metadata#678

Open
jeet-dekivadia wants to merge 1 commit into
openai:mainfrom
jeet-dekivadia:codex/image-generation-output-fields
Open

responses: expose image generation output metadata#678
jeet-dekivadia wants to merge 1 commit into
openai:mainfrom
jeet-dekivadia:codex/image-generation-output-fields

Conversation

@jeet-dekivadia

@jeet-dekivadia jeet-dekivadia commented May 30, 2026

Copy link
Copy Markdown

Summary

  • expose action, background, output_format, quality, revised_prompt, and size on image-generation response variants
  • keep response input-item, item, output-item, and conversation-item representations consistent
  • add a decode regression through ResponseOutputItemUnion.AsImageGenerationCall()

The Responses API image-generation guide documents these fields in emitted image_generation_call output items: https://developers.openai.com/api/docs/guides/tools-image-generation

Fixes #675.

Validation

  • git diff --check
  • go test ./responses -run '^TestResponseOutputItemImageGenerationCallFields$' -count=1

Remote Linux validation

  • git diff --check
  • ./scripts/lint
  • ./scripts/bootstrap
  • ./scripts/test

Signed-off-by: Jeet Dekivadia <jeet.university@gmail.com>
@jeet-dekivadia jeet-dekivadia requested a review from a team as a code owner May 30, 2026 09:58
@jeet-dekivadia

Copy link
Copy Markdown
Author

Small follow-up while this is waiting for review. I kept the generated-shape change focused on image-generation response metadata that is already present on the API object, without changing request serialization. The added regression checks the concrete image-generation output fields so callers can read revised_prompt, size, quality, background, output_format, and action instead of losing that metadata.

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.

event image_generation_call 缺少几个参数

1 participant