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
+1 -1
View File
@@ -1714,7 +1714,7 @@ fn emitted_image_content_item(
) -> FunctionCallOutputContentItem {
FunctionCallOutputContentItem::InputImage {
image_url,
detail: normalize_output_image_detail(turn.features.get(), &turn.model_info, detail),
detail: normalize_output_image_detail(&turn.model_info, detail),
}
}
+2 -37
View File
@@ -2,7 +2,6 @@ use super::*;
use crate::codex::make_session_and_context;
use crate::codex::make_session_and_context_with_dynamic_tools_and_rx;
use crate::turn_diff_tracker::TurnDiffTracker;
use codex_features::Feature;
use codex_protocol::dynamic_tools::DynamicToolCallOutputContentItem;
use codex_protocol::dynamic_tools::DynamicToolResponse;
use codex_protocol::dynamic_tools::DynamicToolSpec;
@@ -295,42 +294,8 @@ async fn emitted_image_content_item_drops_unsupported_explicit_detail() {
}
#[tokio::test]
async fn emitted_image_content_item_does_not_force_original_when_enabled() {
async fn emitted_image_content_item_allows_explicit_original_detail_when_supported() {
let (_session, mut turn) = make_session_and_context().await;
Arc::make_mut(&mut turn.config)
.features
.enable(Feature::ImageDetailOriginal)
.expect("test config should allow feature update");
turn.features
.enable(Feature::ImageDetailOriginal)
.expect("test turn features should allow feature update");
turn.model_info.supports_image_detail_original = true;
let content_item = emitted_image_content_item(
&turn,
"data:image/png;base64,AAA".to_string(),
/*detail*/ None,
);
assert_eq!(
content_item,
FunctionCallOutputContentItem::InputImage {
image_url: "data:image/png;base64,AAA".to_string(),
detail: None,
}
);
}
#[tokio::test]
async fn emitted_image_content_item_allows_explicit_original_detail_when_enabled() {
let (_session, mut turn) = make_session_and_context().await;
Arc::make_mut(&mut turn.config)
.features
.enable(Feature::ImageDetailOriginal)
.expect("test config should allow feature update");
turn.features
.enable(Feature::ImageDetailOriginal)
.expect("test turn features should allow feature update");
turn.model_info.supports_image_detail_original = true;
let content_item = emitted_image_content_item(
@@ -349,7 +314,7 @@ async fn emitted_image_content_item_allows_explicit_original_detail_when_enabled
}
#[tokio::test]
async fn emitted_image_content_item_drops_explicit_original_detail_when_disabled() {
async fn emitted_image_content_item_drops_explicit_original_detail_when_unsupported() {
let (_session, turn) = make_session_and_context().await;
let content_item = emitted_image_content_item(