Skip to content

Require data URLs for code-mode image output - #33659

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/beaf8c8830574150e8166b6ff5daf7f6dc4dc0a1
Jul 16, 2026
Merged

Require data URLs for code-mode image output#33659
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/beaf8c8830574150e8166b6ff5daf7f6dc4dc0a1

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 16, 2026

Copy link
Copy Markdown

Require data URLs for code-mode image output

What changed

  • Accept image output from image() and generatedImage() only when its URL
    uses the data: scheme.
  • Preserve the dedicated error for remote HTTP URLs and report other malformed
    or unsupported image URLs as invalid image output.

Testing

  • Add service-level coverage for rejecting invalid output from both image
    helpers.
  • Add an end-to-end code-mode test that verifies the tool call fails instead of
    returning an invalid image item.

## What changed

- Accept image output from `image()` and `generatedImage()` only when its URL
  uses the `data:` scheme.
- Preserve the dedicated error for remote HTTP URLs and report other malformed
  or unsupported image URLs as invalid image output.

## Testing

- Add service-level coverage for rejecting invalid output from both image
  helpers.
- Add an end-to-end code-mode test that verifies the tool call fails instead of
  returning an invalid image item.

GitOrigin-RevId: beaf8c8830574150e8166b6ff5daf7f6dc4dc0a1
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/beaf8c8830574150e8166b6ff5daf7f6dc4dc0a1 branch from 7a47c2a to 5331d20 Compare July 16, 2026 18:30
@copyberry
copyberry Bot merged commit 5331d20 into main Jul 16, 2026
14 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/beaf8c8830574150e8166b6ff5daf7f6dc4dc0a1 branch July 16, 2026 18:31
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 16, 2026
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.

7 participants