Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions artifacts/github/bundles/openai-codex-pr-26486.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"analysis_mode": "pr_first",
"commits": [
{
"author": "won-openai",
"committed_at": "2026-06-04T23:20:22Z",
"message": "draft",
"sha": "6ca9ccf9cd12de3a88ffa2a001eb78a0b2f97c10",
"url": "https://github.com/openai/codex/commit/6ca9ccf9cd12de3a88ffa2a001eb78a0b2f97c10"
},
{
"author": "won-openai",
"committed_at": "2026-06-04T23:44:07Z",
"message": "fix",
"sha": "0165dbf6eda0ccb61187df6752a4e08de93f520c",
"url": "https://github.com/openai/codex/commit/0165dbf6eda0ccb61187df6752a4e08de93f520c"
},
{
"author": "won-openai",
"committed_at": "2026-06-05T22:30:15Z",
"message": "megaturd",
"sha": "9457965868264ba8838440a6d9ff539d830ee0af",
"url": "https://github.com/openai/codex/commit/9457965868264ba8838440a6d9ff539d830ee0af"
},
{
"author": "won-openai",
"committed_at": "2026-06-08T16:18:14Z",
"message": "comment",
"sha": "2ff147fc6a4721000547e8b0d6b8ea8d97d58f24",
"url": "https://github.com/openai/codex/commit/2ff147fc6a4721000547e8b0d6b8ea8d97d58f24"
},
{
"author": "won-openai",
"committed_at": "2026-06-08T16:33:39Z",
"message": "Merge remote-tracking branch 'origin/main' into imggenext_tool",
"sha": "c5a021feb1b677c105f0f51044311b62b18925af",
"url": "https://github.com/openai/codex/commit/c5a021feb1b677c105f0f51044311b62b18925af"
},
{
"author": "won-openai",
"committed_at": "2026-06-08T20:55:06Z",
"message": "ci fix",
"sha": "034835589958076a97792994e22e724ad6d9a496",
"url": "https://github.com/openai/codex/commit/034835589958076a97792994e22e724ad6d9a496"
}
],
"default_branch": "main",
"docs_refs": [],
"examples_refs": [],
"extracted_flags": [
"URL",
"RESULT",
"TINY_PNG_BYTES",
"V2U",
"OPENAI_API_KEY",
"DEFAULT_READ_TIMEOUT",
"POST",
"ANYTHING",
"IMAGE_GEN_NAMESPACE",
"IMAGEGEN_TOOL_NAME",
"DEFAULT_IMAGE_DETAIL",
"API",
"IMAGE_MODEL",
"MAX_EDIT_IMAGES"
],
"files": [
{
"additions": 1,
"deletions": 0,
"patch_excerpt": "@@ -3106,6 +3106,7 @@ dependencies = [\n \"codex-protocol\",\n \"codex-tools\",\n \"codex-utils-absolute-path\",\n+ \"codex-utils-image\",\n \"http 1.4.0\",\n \"pretty_assertions\",\n \"schemars 0.8.22\",",
"path": "codex-rs/Cargo.lock",
"status": "modified"
},
{
"additions": 154,
"deletions": 6,
"patch_excerpt": "@@ -29,6 +29,11 @@ use wiremock::matchers::method;\n use wiremock::matchers::path;\n \n const RESULT: &str = \"cG5n\";\n+const TINY_PNG_BYTES: &[u8] = &[\n+ 137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 1, 0, 0, 0, 1, 8, 6, 0,\n+ 0, 0, 31, 21, 196, 137, 0, 0, 0, 11, 73, 68, 65, 84, 120, 156, 99, 96, 0, 2, 0, 0, 5, 0, 1,\n+ 122, 94, 171, 63, 0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130,\n+];\n \n #[derive(Clone, Copy)]\n enum ImagegenTestMode {\n@@ -59,7 +64,6 @@ async fn standalone_image_generation_returns_saved_path_hint_to_model() -> Resul\n \"image_gen\",\n \"imagegen\",\n &json!({\n- \"action\": \"generate\",\n \"prompt\": \"paint a blue whale\",\n })\n .to_string(),\n@@ -142,6 +146,67 @@ async fn standalone_image_generation_returns_saved_...",
"path": "codex-rs/app-server/tests/suite/v2/imagegen_extension.rs",
"status": "modified"
},
{
"additions": 1,
"deletions": 0,
"patch_excerpt": "@@ -23,6 +23,7 @@ codex-model-provider-info = { workspace = true }\n codex-protocol = { workspace = true }\n codex-tools = { workspace = true }\n codex-utils-absolute-path = { workspace = true }\n+codex-utils-image = { workspace = true }\n http = { workspace = true }\n schemars = { workspace = true }\n serde = { workspace = true, features = [\"derive\"] }",
"path": "codex-rs/ext/image-generation/Cargo.toml",
"status": "modified"
},
{
"additions": 8,
"deletions": 3,
"patch_excerpt": "@@ -5,8 +5,13 @@ The `image_gen.imagegen` tool enables image generation from descriptions and edi\n \n Guidelines:\n - In code mode, pass the result to `generatedImage(result)`.\n-- Set `action` to `generate` when the user asks for a brand new image.\n-- Set `action` to `edit` when the user asks to modify an existing image from the conversation history.\n-- Directly generate the image without reconfirmation or clarification.\n+- Omit both `referenced_image_paths` and `num_last_images_to_include` when generating a brand new image.\n+- For edits, use `referenced_image_paths` when every target image has a local file path.\n+- If you have not seen a local image yet, use `view_image` to inspect it before editing.\n+- Use `num_last_images_to_include` only when at least one target image has no local file path.\n+- Set `num_last_images_to_include` to the smallest number of recent conversation images that i...",
"path": "codex-rs/ext/image-generation/imagegen_description.md",
"status": "modified"
},
{
"additions": 160,
"deletions": 212,
"patch_excerpt": "@@ -19,10 +19,9 @@ use pretty_assertions::assert_eq;\n \n use super::GeneratedImageOutput;\n use super::ImageRequest;\n-use super::ImagegenAction;\n use super::ImagegenArgs;\n use super::imagegen_tool_spec;\n-use super::request_for_action;\n+use super::request_for_args;\n use crate::IMAGE_GEN_NAMESPACE;\n use crate::IMAGEGEN_TOOL_NAME;\n \n@@ -39,10 +38,17 @@ fn uses_reserved_image_gen_namespace() {\n }\n \n #[test]\n-fn generate_uses_fixed_request_defaults() {\n+fn omitted_references_generate_with_fixed_defaults() {\n assert_eq!(\n- request_for_action(&args(ImagegenAction::Generate, \"paint a moonlit lake\"), &[])\n- .expect(\"generation request should build\"),\n+ request_for_args(\n+ &ImagegenArgs {\n+ prompt: \"paint a moonlit lake\".to_string(),\n+ referenced_image_paths: None,\n+ num_last_images_to_include: None,\n+ },...",
"path": "codex-rs/ext/image-generation/src/tests.rs",
"status": "modified"
},
{
"additions": 145,
"deletions": 103,
"patch_excerpt": "@@ -1,3 +1,5 @@\n+use std::collections::HashSet;\n+\n use codex_api::ImageBackground;\n use codex_api::ImageEditRequest;\n use codex_api::ImageGenerationRequest;\n@@ -28,6 +30,8 @@ use codex_tools::ResponsesApiTool;\n use codex_tools::ToolExposure;\n use codex_tools::default_namespace_description;\n use codex_utils_absolute_path::AbsolutePathBuf;\n+use codex_utils_image::PromptImageMode;\n+use codex_utils_image::load_for_prompt_bytes;\n use schemars::JsonSchema;\n use schemars::r#gen::SchemaSettings;\n use serde::Deserialize;\n@@ -68,14 +72,10 @@ impl ImageGenerationTool {\n #[serde(deny_unknown_fields)]\n struct ImagegenArgs {\n prompt: String,\n- action: ImagegenAction,\n-}\n-\n-#[derive(Debug, Deserialize, JsonSchema)]\n-#[serde(rename_all = \"lowercase\")]\n-enum ImagegenAction {\n- Generate,\n- Edit,\n+ #[schemars(length(max = 5))]\n+ referenced_image_paths: Option<Vec<AbsolutePathBuf>>,\n+ ...",
"path": "codex-rs/ext/image-generation/src/tool.rs",
"status": "modified"
}
],
"linked_issues": [],
"notes": [
"Built from GitHub pull-request, commits, files, and repo endpoints."
],
"primary_pr": {
"body": "## Why\r\n\r\nImage edits should use the exact images selected by the model instead of inferring edit inputs from conversation history.\r\n\r\n## What changed\r\n\r\n- Replaced the image tool's `action` argument with optional `referenced_image_paths`.\r\n- Treats omitted or empty references as generation and populated references as editing.\r\n- Reads referenced absolute image paths and packages them as image data URLs for the edit request.\r\n- Removed the previous history-selection and image-count heuristics.\r\n- Updated direct and code-mode tool instructions and calls.\r\n- Added an app-server integration test covering an attached image routed to the image edit endpoint.\r\n\r\n## Validation\r\n- Tested end-to-end on local `just codex` with copy pasted image, attached image, etc. \r\n- `just test -p codex-image-generation-extension`\r\n- `just test -p codex-app-server standalone_image_edit_uses_attached_model_visible_image`\r\n- `just fix -p codex-image-generation-extension`\r\n- `just bazel-lock-check`",
"labels": [],
"merged_at": "2026-06-08T21:23:56Z",
"number": 26486,
"state": "merged",
"title": "Route image edits through referenced file paths",
"url": "https://github.com/openai/codex/pull/26486"
},
"repo": "openai/codex",
"schema": "github_change_bundle/v1"
}
Loading