fix(cloudflare-ai-gateway): strip anthropic thinking prefill

This commit is contained in:
Peter Steinberger
2026-04-27 21:36:35 +01:00
parent 013939cfc7
commit 599b1b8462
12 changed files with 409 additions and 57 deletions

View File

@@ -137,6 +137,8 @@ external end-user instructions.
- Tool result pairing repair and synthetic tool results.
- Turn validation (merge consecutive user turns to satisfy strict alternation).
- Trailing assistant prefill turns are stripped from outgoing Anthropic Messages
payloads when thinking is enabled, including Cloudflare AI Gateway routes.
- Thinking blocks with missing, empty, or blank replay signatures are stripped
before provider conversion. If that empties an assistant turn, OpenClaw keeps
turn shape with non-empty omitted-reasoning text.