#27512 Anthropic Messages retry drops thinking while keeping clear_thinking_20251015
## Summary
When Anthropic Messages passthrough retries after an invalid thinking signature, LiteLLM strips historical `thinking` / `redacted_thinking` blocks. That part is correct.
However, the retry body also drops the top-level `thinking` parameter while keeping `context_management.edits=[{"type":"clear_thinking_20251015"}]`. Anthropic then rejects the retry because `clear_thinking_20251015` requires thinking to be enabled or adaptive.
## Trigger
We observed this in a Claude CLI session using Anthropic Messages through LiteLLM.
The conversation history included Anthropic thinking blocks. When the next Anthropic Messages request hit the invalid-thinking-signature retry path, LiteLLM stripped the historical thinking blocks but also removed top-level `thinking`, while `clear_thinking_20251015` remained in the request.
## Error
```text API Error: 400 {"error":{"message":"{\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"`clear_thinking_20251015` strategy requires `thinking` to be enabled or adaptive\"},\"request_id\":\"req_REDACTED\"}. Received Model Group=claude-sonnet-4-6\nAvailable Model Group Fallbacks=None","type":"None","param":"None","code"…