mirror of
https://github.com/openai/codex.git
synced 2026-11-08 20:40:33 +00:00
Gate content item kinds behind a feature flag (#40450)
## What changed - Add the under-development `content_item_kinds` feature, disabled by default. - Strip content item classifications from Responses input when the feature is disabled while preserving other passthrough metadata. ## Testing - Add coverage that disables the feature and verifies requests omit content item kinds without removing the turn ID. GitOrigin-RevId: f938feb2895d766d979b1666fc7b97fd128fe8a7
This commit is contained in:
@@ -208,6 +208,7 @@ struct ModelClientState {
|
||||
session_source: SessionSource,
|
||||
originator: String,
|
||||
model_verbosity: Option<VerbosityConfig>,
|
||||
content_item_kinds_enabled: bool,
|
||||
enable_request_compression: bool,
|
||||
include_timing_metrics: bool,
|
||||
beta_features_header: Option<String>,
|
||||
@@ -436,6 +437,7 @@ impl ModelClient {
|
||||
session_source: SessionSource,
|
||||
originator: String,
|
||||
model_verbosity: Option<VerbosityConfig>,
|
||||
content_item_kinds_enabled: bool,
|
||||
enable_request_compression: bool,
|
||||
include_timing_metrics: bool,
|
||||
beta_features_header: Option<String>,
|
||||
@@ -459,6 +461,7 @@ impl ModelClient {
|
||||
session_source,
|
||||
originator,
|
||||
model_verbosity,
|
||||
content_item_kinds_enabled,
|
||||
enable_request_compression,
|
||||
include_timing_metrics,
|
||||
beta_features_header,
|
||||
@@ -963,6 +966,9 @@ impl ModelClient {
|
||||
if item.id().is_some_and(|id| !id.is_prefixed()) {
|
||||
item.set_id(/*new_id*/ None);
|
||||
}
|
||||
if !self.state.content_item_kinds_enabled {
|
||||
item.clear_content_item_kinds();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user