fix: preserve omitted thinking replay turns

This commit is contained in:
Peter Steinberger
2026-04-25 19:54:11 +01:00
parent 690c98ad99
commit a018db771d
6 changed files with 288 additions and 12 deletions

View File

@@ -133,6 +133,9 @@ external end-user instructions.
- Tool result pairing repair and synthetic tool results.
- Turn validation (merge consecutive user turns to satisfy strict alternation).
- Older thinking-only assistant turns that must be stripped are replaced with
non-empty omitted-reasoning text so provider adapters do not drop the replay
turn.
**Amazon Bedrock (Converse API)**
@@ -140,6 +143,8 @@ external end-user instructions.
before replay. Bedrock Converse rejects assistant messages with `content: []`, so
persisted assistant turns with `stopReason: "error"` and empty content are also
repaired on disk before load.
- Older thinking-only assistant turns that must be stripped are replaced with
non-empty omitted-reasoning text so the Converse replay keeps strict turn shape.
- Replay filters OpenClaw delivery-mirror and gateway-injected assistant turns.
- Image sanitization applies through the global rule.