Skip to content

Always send entire request context - #1641

Merged
pakrym-oai merged 3 commits into
mainfrom
pakrym/always-send-full-context
Jul 23, 2025
Merged

pakrym-oai merged 3 commits into
mainfrom
pakrym/always-send-full-context

Conversation

@pakrym-oai

@pakrym-oai pakrym-oai commented Jul 21, 2025 •

Copy link
Copy Markdown
Contributor

Always store the entire conversation history.
Request encrypted COT when not storing Responses.
Send entire input context instead of sending previous_response_id

@pakrym-oai
pakrym-oai requested a review from bolinfest July 21, 2025 21:40
| ResponseItem::FunctionCallOutput { .. } => filtered.push(item.clone()),
ResponseItem::Reasoning { .. } | ResponseItem::Other => {
| ResponseItem::FunctionCallOutput { .. }
| ResponseItem::Reasoning { .. } => filtered.push(item.clone()),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to persist reasoning items to send them along later otherwise requests will fail

}
}

impl<'de> Deserialize<'de> for FunctionCallOutputPayload {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix deserialization of FunctionCallOutputs from rollouts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe include this as a comment with a bit more specificity? I don't know what "fix" means without more context.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment is above the serialize method. This just adds the deserialize for parity.

@pakrym-oai
pakrym-oai marked this pull request as ready for review July 21, 2025 23:09

@gpeal gpeal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I'll let Michael make the final call on this one though.

}
}

impl<'de> Deserialize<'de> for FunctionCallOutputPayload {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe include this as a comment with a bit more specificity? I don't know what "fix" means without more context.

# Conflicts:
#	codex-rs/core/src/codex.rs
#	codex-rs/core/tests/previous_response_id.rs
@pakrym-oai
pakrym-oai merged commit 591cb61 into main Jul 23, 2025
@pakrym-oai
pakrym-oai deleted the pakrym/always-send-full-context branch July 23, 2025 17:37
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants