feat: preserve Responses reasoning state and compact context (#5172)
This commit is contained in:
1 parent
511c764f45
commit
6a1a45d07a
37 files changed
+4778
-153
No files matched your search
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user