feat: preserve Responses reasoning state and compact context (#5172)

This commit is contained in:
chengyongru authored and GitHub committed 2026-07-30 22:39:43 +08:00
1 parent 511c764f45
commit 6a1a45d07a
37 files changed
+4778 -153

No files matched your search

+3
View File
@@ -931,6 +931,7 @@ class Consolidator:
session_key=session.key,
)
session.last_consolidated = end_idx
session.provider_state = None
self.sessions.save(session)
return summary
@@ -1136,6 +1137,7 @@ class Consolidator:
if summary:
last_summary = summary
session.last_consolidated = end_idx
session.provider_state = None
self.sessions.save(session)
if not summary:
# LLM is degraded — stop hammering it this call;
@@ -1205,6 +1207,7 @@ class Consolidator:
# Preserve history and advance only the replay boundary.
session.last_consolidated = len(session.messages) - len(visible_suffix)
session.provider_state = None
self.sessions.save(session)
logger.info(