Invalid signature in thinking block when switching Claude models (Copilot provider) #8189

Closed
opened 2026-02-16 18:09:23 -05:00 by yindo · 3 comments
Owner

Originally created by @mouadlotfi on GitHub (Jan 31, 2026).

Originally assigned to: @rekram1-node on GitHub.

Summary

Switching from Claude Opus 4.5 to Claude Sonnet 4.5 within the same conversation (GitHub Copilot provider) fails with:

messages.3.content.0: Invalid `signature` in `thinking` block

Steps to Reproduce

  1. Start a conversation using Claude Opus 4.5 via GitHub Copilot provider.
  2. In the same conversation, switch to Claude Sonnet 4.5 (thinking enabled).
  3. Send a new message.

Actual Behavior

Request fails with the error above.

Expected Behavior

Switching between Claude models in the same thread should work, or OpenCode should strip/normalize incompatible thinking blocks to avoid signature validation failures.

Notes

  • Switching to OpenAI Codex medium in the same conversation works normally.
  • Workaround: start a new conversation before switching Claude models.
  • OpenCode version: (not provided).
  • OS: (not provided).
  • Provider: GitHub Copilot.

If you need additional logs or version info, I can follow up.

Originally created by @mouadlotfi on GitHub (Jan 31, 2026). Originally assigned to: @rekram1-node on GitHub. ## Summary Switching from Claude Opus 4.5 to Claude Sonnet 4.5 within the same conversation (GitHub Copilot provider) fails with: ``` messages.3.content.0: Invalid `signature` in `thinking` block ``` ## Steps to Reproduce 1. Start a conversation using Claude Opus 4.5 via GitHub Copilot provider. 2. In the same conversation, switch to Claude Sonnet 4.5 (thinking enabled). 3. Send a new message. ## Actual Behavior Request fails with the error above. ## Expected Behavior Switching between Claude models in the same thread should work, or OpenCode should strip/normalize incompatible thinking blocks to avoid signature validation failures. ## Notes - Switching to OpenAI Codex medium in the same conversation works normally. - Workaround: start a new conversation before switching Claude models. - OpenCode version: (not provided). - OS: (not provided). - Provider: GitHub Copilot. If you need additional logs or version info, I can follow up.
yindo closed this issue 2026-02-16 18:09:23 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 31, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #10970: Claude Models Thinking block error - reports similar thinking block validation errors when writing tools or streaming
  • #6418: Error: Invalid signature in thinking block - reports the exact same error message when switching models mid-session (GLM 4.7/MinMax 2.1 to Opus 4.5)

The error pattern appears to be a known issue with thinking block signature validation when switching between models with different thinking block implementations.

Feel free to ignore if these don't address your specific case.

@github-actions[bot] commented on GitHub (Jan 31, 2026): This issue might be a duplicate of existing issues. Please check: - #10970: Claude Models Thinking block error - reports similar thinking block validation errors when writing tools or streaming - #6418: Error: Invalid `signature` in `thinking` block - reports the exact same error message when switching models mid-session (GLM 4.7/MinMax 2.1 to Opus 4.5) The error pattern appears to be a known issue with thinking block signature validation when switching between models with different thinking block implementations. Feel free to ignore if these don't address your specific case.
Author
Owner

@hchaudhary1 commented on GitHub (Jan 31, 2026):

seeing same issue..

@hchaudhary1 commented on GitHub (Jan 31, 2026): seeing same issue..
Author
Owner

@rekram1-node commented on GitHub (Feb 1, 2026):

got a pr up with fixes, doing some touches and adding more tests.

The github copilot provider is non standard so we need to maintain a bit of logic ourselves

@rekram1-node commented on GitHub (Feb 1, 2026): got a pr up with fixes, doing some touches and adding more tests. The github copilot provider is non standard so we need to maintain a bit of logic ourselves
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#8189