mirror of
https://github.com/openai/codex.git
synced 2026-11-09 20:50:33 +00:00
codex: move response metadata filtering upstream
Filter rollout-only response metadata out of resumed initial messages in protocol, so app-server does not need to scrub SessionConfigured history. Keep app-server's live event suppression so ResponseMetadata stays out of the public interface. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
Codex
parent
792478ef87
commit
24eebd7d5c
@@ -1979,7 +1979,11 @@ impl InitialHistory {
|
||||
.history
|
||||
.iter()
|
||||
.filter_map(|ri| match ri {
|
||||
RolloutItem::EventMsg(ev) => Some(ev.clone()),
|
||||
RolloutItem::EventMsg(ev)
|
||||
if !matches!(ev, EventMsg::ResponseMetadata(_)) =>
|
||||
{
|
||||
Some(ev.clone())
|
||||
}
|
||||
_ => None,
|
||||
})
|
||||
.collect(),
|
||||
@@ -1988,7 +1992,11 @@ impl InitialHistory {
|
||||
items
|
||||
.iter()
|
||||
.filter_map(|ri| match ri {
|
||||
RolloutItem::EventMsg(ev) => Some(ev.clone()),
|
||||
RolloutItem::EventMsg(ev)
|
||||
if !matches!(ev, EventMsg::ResponseMetadata(_)) =>
|
||||
{
|
||||
Some(ev.clone())
|
||||
}
|
||||
_ => None,
|
||||
})
|
||||
.collect(),
|
||||
|
||||
Reference in New Issue
Block a user