Repository navigation
Error: Invalid signature in thinking block #6418
Description
Activity
github-actions commented
on Dec 30, 2025 on Dec 30, 2025 – with GitHub ActionsContributorMore actionsThis issue might be a duplicate of existing issues. Please check:
- [BUG]: Gemini 3 Pro function calling fails - missing
thoughtSignaturesupport #4832: [BUG]: Gemini 3 Pro function calling fails - missingthoughtSignaturesupport - Similar issue withsignaturein thinking blocks when using models with reasoning - Response terminates prematurely when using Gemini 3 via LiteLLM #6244: Response terminates prematurely when using Gemini 3 via LiteLLM - Related issue with thinking/reasoning blocks and signature validation
- SSE Stream Bug: Out-of-Order thinking_delta via LiteLLM → AWS Bedrock #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.
- [BUG]: Gemini 3 Pro function calling fails - missing
Yeah ik why, I think we have to filter out all reasoning from old model when u switch
Reacted by rob, Kai H. Meder and Hanasakiwould 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 blockI made a Session Repair Tool on this issue.
I hit this
Corrupted thought signature.error when I switch from google provider to manul api tokenI have this too. I'm not using Anthropic subscription directly, I do it via Github Copilot subscription.
Steps I did before getting the same error (all models from Github Copilot):
- Plan with Gemini 3 Pro Preview
- Switch to Build Claude Sonnet 4.5 thinking.
- Type "Build it".
Got this error
messages.1.content.0: Invalid `signature` in `thinking` block.
Usingopencodeversion 1.1.48 invs code.just now getting this same error on opus 4.5 and sonnet through github copilot sub. Using v1.1.48 on kitty with hyprland/arch
- added a commit that references this issue
on Feb 3, 2026 This was fixed for all models a while ago, but for github copilot there was a separate issue that is fixed in dev.
Release should go out tonight
Reacted by Derek Corniello and CC- Reacted by Gileade C. Valente
I can confirm that this bug in switching between models in the same session with Github Copilot subscription integration came back. I've got an error similar to @Wenbobobo 's one (
messages.21.content.0: Invalid 'signature' in 'thinking' block) when switching from gemini-3-pro-preview to claude-opus-4.6 in opencode 1.1.53 installed in Pop!_OS 24.04 running in Cosmic Terminal.
The issue seems to happen only in the same execution. I closed opencode CLI client, opened it again, resumed the session, and resent the last prompt and it worked fine.

Description
When changing model mid session from GLM 4.7 or MinMax 2.1 i get this error
messages.19.content.0: InvalidsignatureinthinkingblockNot sure why, if I toggle back to the first model I was using it works fine.
OpenCode version
1.0.207
Steps to reproduce
Will error
Screenshot and/or share link
Operating System
mac os x
Terminal
ghostty