Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Keep image_detail_original as a removed feature flag (#17803)

Curtis 'Fjord' Hawthorne769b1c3d7e40
diff --git a/codex-rs/cli/src/main.rs b/codex-rs/cli/src/main.rs
index 563790c827..5ad86a80fd 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 58c1eb4d12..7c3f6dd99a 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 aa32a45718..727c32ccd4 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 3ecab0997c..818ffc8bd7 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);