Skip to content

fix: pass reference images to Codex image generation - #33969

Closed
nikzolahr wants to merge 1 commit into
NousResearch:mainfrom
nikzolahr:fix/image-gen-reference-images
Closed

fix: pass reference images to Codex image generation#33969
nikzolahr wants to merge 1 commit into
NousResearch:mainfrom
nikzolahr:fix/image-gen-reference-images

Conversation

@nikzolahr

Copy link
Copy Markdown

Summary

  • expose optional reference_image_paths on the Hermes image_generate tool schema
  • forward reference images through image plugin dispatch into the provider kwargs
  • teach the OpenAI Codex image generation plugin to send local/URL reference images as input_image items
  • return a clear unsupported-reference error when references are provided without a reference-capable plugin

Test Plan

  • python -m pytest tests/tools/test_image_generation.py tests/tools/test_image_generation_plugin_dispatch.py tests/plugins/image_gen/test_openai_codex_provider.py -q -o 'addopts='

@alt-glitch alt-glitch added type/feature New feature or request comp/plugins Plugin system and bundled plugins tool/vision Vision analysis and image generation P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels May 28, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #15308 and #21854 — both add optional reference image support to image_generate with openai-codex provider opt-in. Same feature, same code paths.

@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Closing as a duplicate — Codex OAuth image-to-image / reference-image input is now on main via #57017 (merge commit 019950560).

That PR wires source/reference images through the Codex Responses input_image path on the unified image_generate surface, with magic-byte validation, a 25MB cap, the agent.file_safety read guard, and a 16-image clamp. Your PR tackled the same feature — thank you for the contribution and for helping surface how much demand there was for this. Credit to everyone in the cluster who pushed on it.

If you spot a gap in the merged implementation, please open a follow-up. 🙏

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

Labels

comp/plugins Plugin system and bundled plugins duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have tool/vision Vision analysis and image generation type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants