From 769b1c3d7e40195f5a4048f82245e3fc19441c4d Mon Sep 17 00:00:00 2001 From: Curtis 'Fjord' Hawthorne Date: Tue, 14 Apr 2026 11:06:50 -0700 Subject: [PATCH] Keep image_detail_original as a removed feature flag (#17803) --- codex-rs/cli/src/main.rs | 13 +++++++++++++ codex-rs/core/config.schema.json | 6 ++++++ codex-rs/features/src/lib.rs | 9 +++++++++ codex-rs/features/src/tests.rs | 14 ++++++++++++++ 4 files changed, 42 insertions(+) diff --git a/codex-rs/cli/src/main.rs b/codex-rs/cli/src/main.rs index 563790c82..5ad86a80f 100644 --- a/codex-rs/cli/src/main.rs +++ b/codex-rs/cli/src/main.rs @@ -2205,6 +2205,19 @@ mod tests { ); } + #[test] + fn feature_toggles_accept_removed_image_detail_original_flag() { + let toggles = FeatureToggles { + enable: vec!["image_detail_original".to_string()], + disable: Vec::new(), + }; + let overrides = toggles.to_overrides().expect("valid features"); + assert_eq!( + overrides, + vec!["features.image_detail_original=true".to_string(),] + ); + } + #[test] fn feature_toggles_unknown_feature_errors() { let toggles = FeatureToggles { diff --git a/codex-rs/core/config.schema.json b/codex-rs/core/config.schema.json index 58c1eb4d1..7c3f6dd99 100644 --- a/codex-rs/core/config.schema.json +++ b/codex-rs/core/config.schema.json @@ -398,6 +398,9 @@ "guardian_approval": { "type": "boolean" }, + "image_detail_original": { + "type": "boolean" + }, "image_generation": { "type": "boolean" }, @@ -2251,6 +2254,9 @@ "guardian_approval": { "type": "boolean" }, + "image_detail_original": { + "type": "boolean" + }, "image_generation": { "type": "boolean" }, diff --git a/codex-rs/features/src/lib.rs b/codex-rs/features/src/lib.rs index aa32a4571..727c32ccd 100644 --- a/codex-rs/features/src/lib.rs +++ b/codex-rs/features/src/lib.rs @@ -178,6 +178,9 @@ pub enum Feature { RealtimeConversation, /// Connect app-server to the ChatGPT remote control service. RemoteControl, + /// Removed compatibility flag retained as a no-op so old wrappers can + /// still pass `--enable image_detail_original`. + ImageDetailOriginal, /// Removed compatibility flag. The TUI now always uses the app-server implementation. TuiAppServer, /// Prevent idle system sleep while a turn is actively running. @@ -874,6 +877,12 @@ pub const FEATURES: &[FeatureSpec] = &[ stage: Stage::UnderDevelopment, default_enabled: false, }, + FeatureSpec { + id: Feature::ImageDetailOriginal, + key: "image_detail_original", + stage: Stage::Removed, + default_enabled: false, + }, FeatureSpec { id: Feature::TuiAppServer, key: "tui_app_server", diff --git a/codex-rs/features/src/tests.rs b/codex-rs/features/src/tests.rs index 3ecab0997..818ffc8bd 100644 --- a/codex-rs/features/src/tests.rs +++ b/codex-rs/features/src/tests.rs @@ -53,6 +53,12 @@ fn use_linux_sandbox_bwrap_is_removed_and_disabled_by_default() { assert_eq!(Feature::UseLinuxSandboxBwrap.default_enabled(), false); } +#[test] +fn image_detail_original_is_removed_and_disabled_by_default() { + assert_eq!(Feature::ImageDetailOriginal.stage(), Stage::Removed); + assert_eq!(Feature::ImageDetailOriginal.default_enabled(), false); +} + #[test] fn js_repl_is_experimental_and_user_toggleable() { let spec = Feature::JsRepl.info(); @@ -145,6 +151,14 @@ fn use_linux_sandbox_bwrap_is_a_removed_feature_key() { ); } +#[test] +fn image_detail_original_is_a_removed_feature_key() { + assert_eq!( + feature_for_key("image_detail_original"), + Some(Feature::ImageDetailOriginal) + ); +} + #[test] fn image_generation_is_under_development() { assert_eq!(Feature::ImageGeneration.stage(), Stage::UnderDevelopment);