You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Git Copilot claude 3.7 sonnet thinking is not working in the opencode CLI #2305
Got a similar error message when I want to use this model too (without any configuration override):
AI_APICallError: messages.1.content.0.type: Expected `thinking` or `redacted_thinking`, but found `text`. When `thinking` is enabled, a final `assistant` message must start with a thinking block (preceeding the lastmost set of `tool_use` and `tool_result` blocks). We recommend you include thinking blocks from previous turns. To avoid this requirement, disable
`thinking`. Please consult our documentation at https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking
@rekram1-node Yes, I've observed it in both of the current Claude 4 models (anthropic/claude-sonnet-4-20250514, anthropic/claude-opus-4-1-20250805) . Both on Copilot and Anthropic API. That's why I commented, as I figured it may be worth mentioning that the scope is larger than before stated.
the share link does have tokens at each message it just isnt visible in ui, like when u share it makes a lil json object of the thread and it has tokens
Activity
github-actions commentedon Aug 29, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Aug 29, 2025
@ru-aish just to confirm you are using
claude-3.7-sonnet-thoughtcorrect?I get errs w/ it too so I can help investigate this
ru-aish commentedon Aug 29, 2025
Yep it claude-3.7-sonnet-thought used through copilot auth.
rekram1-node commentedon Aug 29, 2025
gotcha ill look into it
fmatsos commentedon Sep 11, 2025
Got a similar error message when I want to use this model too (without any configuration override):
I wanted to use it in
buildmode.Sewer56 commentedon Sep 12, 2025
This also affects Sonnet 4 & Opus 4.1
Not just Sonnet 3.7.
Not only CoPilot but also directly via Anthropic.
rekram1-node commentedon Sep 12, 2025
@Sewer56 the only model I get this error with is sonnet 3.7 thought through copilot , are you getting this error with other models?
Sewer56 commentedon Sep 12, 2025
@rekram1-node Yes, I've observed it in both of the current
Claude 4models (anthropic/claude-sonnet-4-20250514,anthropic/claude-opus-4-1-20250805) . Both on Copilot and Anthropic API. That's why I commented, as I figured it may be worth mentioning that the scope is larger than before stated.rekram1-node commentedon Sep 12, 2025
Can you provide a share link? I can use sonnet 4 with thinking just fine:
https://opencode.ai/s/KUzNz8HR
Do you have any special config?
Sewer56 commentedon Sep 12, 2025
This tends to happen most often during long context.
I dug out the last time it happened from my local history. It was here https://opencode.ai/s/I4nxRe6B#msg_93bd5e186001Ig0apIjqRFxmHI-0 (when I was doing work stuff, as opposed to hobby stuff).
(The error doesn't show in the share, so here it is)
That's really, really deep in- (sorry about that). Because the refinements weren't super complex I settled for auto-compact that one time 😅 .
I'm guessing it's somewhat related to
Thinking->Failed Tool Call.rekram1-node commentedon Sep 12, 2025
ahh gotcha maybe a compact issue if it only happens during long context
Sewer56 commentedon Sep 12, 2025
It could be an
auto-compactat a bad moment; that's not unthinkable.According to URL, was 54th message since last compact.
Wish the share link shown token usages at each message, aaaa.
rekram1-node commentedon Sep 12, 2025
the share link does have tokens at each message it just isnt visible in ui, like when u share it makes a lil json object of the thread and it has tokens
rekram1-node commentedon Sep 18, 2025
This is fixed on latest I tested a bit seems fixed