mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 15:01:41 +03:00
chore: Run pnpm format:fix.
This commit is contained in:
@@ -5,6 +5,7 @@ read_when:
|
||||
- You are changing transcript sanitization or tool-call repair logic
|
||||
- You are investigating tool-call id mismatches across providers
|
||||
---
|
||||
|
||||
# Transcript Hygiene (Provider Fixups)
|
||||
|
||||
This document describes **provider-specific fixes** applied to transcripts before a run
|
||||
@@ -12,6 +13,7 @@ This document describes **provider-specific fixes** applied to transcripts befor
|
||||
provider requirements. They do **not** rewrite the stored JSONL transcript on disk.
|
||||
|
||||
Scope includes:
|
||||
|
||||
- Tool call id sanitization
|
||||
- Tool result pairing repair
|
||||
- Turn validation / ordering
|
||||
@@ -19,6 +21,7 @@ Scope includes:
|
||||
- Image payload sanitization
|
||||
|
||||
If you need transcript storage details, see:
|
||||
|
||||
- [/reference/session-management-compaction](/reference/session-management-compaction)
|
||||
|
||||
---
|
||||
@@ -26,6 +29,7 @@ If you need transcript storage details, see:
|
||||
## Where this runs
|
||||
|
||||
All transcript hygiene is centralized in the embedded runner:
|
||||
|
||||
- Policy selection: `src/agents/transcript-policy.ts`
|
||||
- Sanitization/repair application: `sanitizeSessionHistory` in `src/agents/pi-embedded-runner/google.ts`
|
||||
|
||||
@@ -39,6 +43,7 @@ Image payloads are always sanitized to prevent provider-side rejection due to si
|
||||
limits (downscale/recompress oversized base64 images).
|
||||
|
||||
Implementation:
|
||||
|
||||
- `sanitizeSessionMessagesImages` in `src/agents/pi-embedded-helpers/images.ts`
|
||||
- `sanitizeContentBlocksImages` in `src/agents/tool-images.ts`
|
||||
|
||||
@@ -47,6 +52,7 @@ Implementation:
|
||||
## Provider matrix (current behavior)
|
||||
|
||||
**OpenAI / OpenAI Codex**
|
||||
|
||||
- Image sanitization only.
|
||||
- On model switch into OpenAI Responses/Codex, drop orphaned reasoning signatures (standalone reasoning items without a following content block).
|
||||
- No tool call id sanitization.
|
||||
@@ -56,6 +62,7 @@ Implementation:
|
||||
- No thought signature stripping.
|
||||
|
||||
**Google (Generative AI / Gemini CLI / Antigravity)**
|
||||
|
||||
- Tool call id sanitization: strict alphanumeric.
|
||||
- Tool result pairing repair and synthetic tool results.
|
||||
- Turn validation (Gemini-style turn alternation).
|
||||
@@ -63,16 +70,20 @@ Implementation:
|
||||
- Antigravity Claude: normalize thinking signatures; drop unsigned thinking blocks.
|
||||
|
||||
**Anthropic / Minimax (Anthropic-compatible)**
|
||||
|
||||
- Tool result pairing repair and synthetic tool results.
|
||||
- Turn validation (merge consecutive user turns to satisfy strict alternation).
|
||||
|
||||
**Mistral (including model-id based detection)**
|
||||
|
||||
- Tool call id sanitization: strict9 (alphanumeric length 9).
|
||||
|
||||
**OpenRouter Gemini**
|
||||
|
||||
- Thought signature cleanup: strip non-base64 `thought_signature` values (keep base64).
|
||||
|
||||
**Everything else**
|
||||
|
||||
- Image sanitization only.
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user