[codex-core] Add feature-flagged server-side compaction [ci changed_files]

Move normal auto-compaction onto inline Responses API compaction behind a feature flag, keep the legacy path for manual and compatibility cases, and add observability plus integration coverage.

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
Cooper Gamble
2026-03-08 16:11:53 +00:00
parent 052ec629b1
commit ea2a4be3d8
11 changed files with 770 additions and 22 deletions

View File

@@ -626,6 +626,16 @@ pub fn ev_assistant_message(id: &str, text: &str) -> Value {
})
}
pub fn ev_compaction(encrypted_content: &str) -> Value {
serde_json::json!({
"type": "response.output_item.done",
"item": {
"type": "compaction",
"encrypted_content": encrypted_content,
}
})
}
pub fn user_message_item(text: &str) -> ResponseItem {
ResponseItem::Message {
id: None,