Skip to content

Git Copilot claude 3.7 sonnet thinking is not working in the opencode CLI #2305

Closed

Description

@ru-aish

Even after toggling the thinking using '/thinking' it is giving this error::

Image

Activity

  1. github-actions commented on Aug 29, 2025

    @github-actions
    Contributor

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

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Aug 29, 2025

    @rekram1-node
    Contributor

    @ru-aish just to confirm you are using claude-3.7-sonnet-thought correct?

    I get errs w/ it too so I can help investigate this

  3. self-assigned this
    on Aug 29, 2025
  4. ru-aish commented on Aug 29, 2025

    @ru-aish
    Author

    Yep it claude-3.7-sonnet-thought used through copilot auth.

  5. rekram1-node commented on Aug 29, 2025

    @rekram1-node
    Contributor

    gotcha ill look into it

  6. fmatsos commented on Sep 11, 2025

    @fmatsos

    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

    I wanted to use it in build mode.

  7. Sewer56 commented on Sep 12, 2025

    @Sewer56
    Contributor

    This also affects Sonnet 4 & Opus 4.1
    Not just Sonnet 3.7.

    Not only CoPilot but also directly via Anthropic.

  8. rekram1-node commented on Sep 12, 2025

    @rekram1-node
    Contributor

    @Sewer56 the only model I get this error with is sonnet 3.7 thought through copilot , are you getting this error with other models?

  9. Sewer56 commented on Sep 12, 2025

    @Sewer56
    Contributor

    @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.

  10. rekram1-node commented on Sep 12, 2025

    @rekram1-node
    Contributor

    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?

  11. Sewer56 commented on Sep 12, 2025

    @Sewer56
    Contributor

    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).

    Image

    (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.

  12. rekram1-node commented on Sep 12, 2025

    @rekram1-node
    Contributor

    ahh gotcha maybe a compact issue if it only happens during long context

  13. Sewer56 commented on Sep 12, 2025

    @Sewer56
    Contributor

    It could be an auto-compact at 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.

  14. rekram1-node commented on Sep 12, 2025

    @rekram1-node
    Contributor

    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

  15. rekram1-node commented on Sep 18, 2025

    @rekram1-node
    Contributor

    This is fixed on latest I tested a bit seems fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions