fix(openrouter): strip Anthropic reasoning prefill

This commit is contained in:
Peter Steinberger
2026-05-02 06:46:37 +01:00
parent dc72a2aa42
commit 24d5649284
7 changed files with 235 additions and 9 deletions

View File

@@ -177,6 +177,12 @@ inter-session user turns that only have provenance metadata.
- Thought signature cleanup: strip non-base64 `thought_signature` values (keep base64).
**OpenRouter Anthropic**
- Trailing assistant prefill turns are stripped from verified OpenRouter
OpenAI-compatible Anthropic model payloads when reasoning is enabled, matching
direct Anthropic and Cloudflare Anthropic replay behavior.
**Everything else**
- Image sanitization only.