# Codex OAuth image-to-image smoke test This is a live smoke test for the PR that forwards `image_url` as a Responses `input_image` part to the OpenAI Codex-authenticated image backend. ## Configuration ```yaml image_gen: provider: openai-codex model: gpt-image-2-high ``` Auth source: `~/.codex/auth.json` ChatGPT/Codex OAuth token, read through Hermes' existing `_read_codex_access_token()` helper. ## Source image Generated with the existing text-to-image path: ```python provider.generate( "A tasteful, wholesome portrait of a beautiful young adult woman ...", aspect_ratio="portrait", ) ``` ## Edit request The source image path was passed back to the same provider as `image_url`: ```python provider.generate( "Edit the provided portrait while preserving the exact same adult woman identity, face, hairstyle, expression, lighting, camera angle, and background. Change only the outfit to a modest Japanese school-uniform-inspired JK outfit: navy sailor-style blouse collar, simple ribbon tie, navy pleated skirt below the knee. Keep it wholesome, non-sexual, realistic photography.", aspect_ratio="portrait", image_url="/Users/baicai/.hermes/cache/images/openai_codex_gpt-image-2-high_20260701_021616_67fb90c5.png", ) ``` ## Result shape ```json { "success": true, "image": "/Users/baicai/.hermes/cache/images/openai_codex_gpt-image-2-high_20260701_023558_15fb310e.png", "model": "gpt-image-2-high", "aspect_ratio": "portrait", "modality": "image", "provider": "openai-codex", "size": "1024x1536", "quality": "high", "input_image_count": 1 } ``` The important behavior is that the result reports `modality: "image"` and `input_image_count: 1`, proving Hermes did not silently fall back to text-to-image.