mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 13:40:44 +00:00
fix(openrouter): strip Anthropic reasoning prefill
This commit is contained in:
@@ -159,6 +159,13 @@ does **not** inject those OpenRouter-specific headers or Anthropic cache markers
|
||||
better prompt-cache reuse on system/developer prompt blocks.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Anthropic reasoning prefill">
|
||||
On verified OpenRouter routes, Anthropic model refs with reasoning enabled
|
||||
drop trailing assistant prefill turns before the request reaches OpenRouter,
|
||||
matching Anthropic's requirement that reasoning conversations end with a user
|
||||
turn.
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Thinking / reasoning injection">
|
||||
On supported non-`auto` routes, OpenClaw maps the selected thinking level to
|
||||
OpenRouter proxy reasoning payloads. Unsupported model hints and
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user