Error: Invalid `signature` in `thinking` block
Description
When changing model mid session from GLM 4.7 or MinMax 2.1 i get this error
messages.19.content.0: Invalid signatureinthinking block
Not sure why, if I toggle back to the first model I was using it works fine.
OpenCode version
1.0.207
Steps to reproduce
- Start a new sesson
- Send few messages with GLM 4.7 or MinMax 2.1
- Switch model to Opus 4.5 via Anthropic
- Send message
Will error
Screenshot and/or share link
Operating System
mac os x
Terminal
ghostty
This issue might be a duplicate of existing issues. Please check:
- #4832: [BUG]: Gemini 3 Pro function calling fails - missing
thoughtSignaturesupport - Similar issue withsignaturein thinking blocks when using models with reasoning - #6244: Response terminates prematurely when using Gemini 3 via LiteLLM - Related issue with thinking/reasoning blocks and signature validation
- #3596: SSE Stream Bug: Out-of-Order thinking_delta via LiteLLM → AWS Bedrock - Addresses thinking block ordering issues that could relate to signature problems
Feel free to ignore if none of these address your specific case.
Yeah ik why, I think we have to filter out all reasoning from old model when u switch
would there be a way to transform it to the right format or somethin without just stripping it? or is the default behavior to strip thoughts from subsequent messages?
I can confirm this issue as well:
Description: An error occurs when switching to Anthropic models during an active session and sending a message after switching.|
Steps to reproduce:
- Connect to the Anthropic provider using the Pro subscription option
- Start chat with non-Anthropic model (e.g., Grok)
- Switch to any Anthropic model (Claude Sonnet 4.5 or Opus)
- Try to send a message or switch models
Error message:
messages.1.content.0: Invalid signature in thinking block
I made a Session Repair Tool on this issue.