Always enable original image detail on supported models (#17665)

## Summary

This PR removes `image_detail_original` as a runtime experiment and
makes original image detail available whenever the selected model
supports it.

Concretely, this change:
- drops the `image_detail_original` feature flag from the feature
registry and generated config schema
- makes tool-emitted image detail depend only on
`ModelInfo.supports_image_detail_original`
- updates `view_image` and `code_mode`/`js_repl` image emission to use
that capability check directly
- removes now-redundant experiment-specific tests and instruction
coverage
- keeps backward compatibility for existing configs by silently ignoring
a stale `features.image_detail_original` entry

The net effect is that `detail: "original"` is always available on
supported models, without requiring an experiment toggle.
This commit is contained in:
Curtis 'Fjord' Hawthorne
2026-04-14 08:15:56 -07:00
committed by GitHub
parent e6947f85f6
commit f030ab62eb
15 changed files with 48 additions and 222 deletions

View File

@@ -134,8 +134,6 @@ pub enum Feature {
Telepathy,
/// Append additional AGENTS.md guidance to user instructions.
ChildAgentsMd,
/// Allow the model to request `detail: "original"` image outputs on supported models.
ImageDetailOriginal,
/// Compress request bodies (zstd) when sending streaming requests to codex-backend.
EnableRequestCompression,
/// Enable collab tools.
@@ -363,6 +361,9 @@ impl Features {
"tui_app_server" => {
continue;
}
"image_detail_original" => {
continue;
}
_ => {}
}
match feature_for_key(k) {
@@ -683,16 +684,6 @@ pub const FEATURES: &[FeatureSpec] = &[
stage: Stage::UnderDevelopment,
default_enabled: false,
},
FeatureSpec {
id: Feature::ImageDetailOriginal,
key: "image_detail_original",
stage: Stage::Experimental {
name: "Original image detail",
menu_description: "Let the model inspect tool-emitted images at full resolution on supported models instead of a resized approximation. This affects tool-emitted images such as those produced by `view_image`, not images attached directly in the UI. It is particularly important for localization and precise UI targeting, for reading small text, and for reasoning about precise layout.",
announcement: "NEW: Original image detail is now available in /experimental. Enable it to let tools request full-resolution image detail on supported models for CUA and localization tasks.",
},
default_enabled: false,
},
FeatureSpec {
id: Feature::ApplyPatchFreeform,
key: "apply_patch_freeform",

View File

@@ -169,18 +169,6 @@ fn use_agent_identity_is_under_development() {
assert_eq!(Feature::UseAgentIdentity.default_enabled(), false);
}
#[test]
fn image_detail_original_feature_is_experimental_and_user_toggleable() {
let stage = Feature::ImageDetailOriginal.stage();
assert!(matches!(stage, Stage::Experimental { .. }));
assert_eq!(
stage.experimental_menu_name(),
Some("Original image detail")
);
assert_eq!(Feature::ImageDetailOriginal.default_enabled(), false);
}
#[test]
fn collab_is_legacy_alias_for_multi_agent() {
assert_eq!(feature_for_key("multi_agent"), Some(Feature::Collab));
@@ -263,6 +251,25 @@ fn from_sources_applies_base_profile_and_overrides() {
assert_eq!(features.enabled(Feature::WebSearchRequest), false);
}
#[test]
fn from_sources_ignores_removed_image_detail_original_feature_key() {
let features_toml = FeaturesToml::from(BTreeMap::from([(
"image_detail_original".to_string(),
true,
)]));
let features = Features::from_sources(
FeatureConfigSource {
features: Some(&features_toml),
..Default::default()
},
FeatureConfigSource::default(),
FeatureOverrides::default(),
);
assert_eq!(features, Features::with_defaults());
}
#[test]
fn multi_agent_v2_feature_config_deserializes_boolean_toggle() {
let features: FeaturesToml = toml::from_str(