Filter out reasoning items from previous turns (#5857)

Reduces request size and prevents 400 errors when switching between API
orgs.

Based on Responses API behavior described in
https://cookbook.openai.com/examples/responses_api/reasoning_items#caching
This commit is contained in:
pakrym-oai
2025-10-28 11:39:34 -07:00
committed by GitHub
parent 65107d24a2
commit 1b8f2543ac
6 changed files with 176 additions and 29 deletions

View File

@@ -34,10 +34,6 @@ impl SessionState {
self.history.record_items(items)
}
pub(crate) fn history_snapshot(&mut self) -> Vec<ResponseItem> {
self.history.get_history()
}
pub(crate) fn clone_history(&self) -> ConversationHistory {
self.history.clone()
}