mirror of
https://github.com/openai/codex.git
synced 2026-09-20 12:47:38 +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:
@@ -1316,6 +1316,21 @@ impl ResponseItem {
|
||||
}
|
||||
}
|
||||
|
||||
/// Removes content item classifications while preserving other passthrough metadata.
|
||||
pub fn clear_content_item_kinds(&mut self) {
|
||||
let Some(metadata) = self.internal_chat_message_metadata_passthrough_mut() else {
|
||||
return;
|
||||
};
|
||||
let Some(metadata_value) = metadata else {
|
||||
return;
|
||||
};
|
||||
|
||||
metadata_value.content_item_kinds = None;
|
||||
if metadata_value == &InternalChatMessageMetadataPassthrough::default() {
|
||||
*metadata = None;
|
||||
}
|
||||
}
|
||||
|
||||
fn internal_chat_message_metadata_passthrough(
|
||||
&self,
|
||||
) -> Option<&InternalChatMessageMetadataPassthrough> {
|
||||
|
||||
Reference in New Issue
Block a user