Skip to content

Reasoning Doesn't Work for Claude Models through Vertex Provider #9894

Closed

Description

@MichaelYochpaz

Description

Hey, I'm using Claude Opus 4.5 through GCP Vertex AI, and noticed that for some reason, the reasoning doesn't work for me, even when reasoning is set to "high".

I initially thought it was perhaps hidden (I'm new to using OpenCode), but the responses I'm getting are way too fast for that, and I've tried toggling /thinking on and off, but it made no difference.

I also tried using a custom configuration on the config:

    "provider": {
        "google-vertex-anthropic": {
            "models": {
                "claude-opus-4-5@20251101": {
                    "variants": {
                        "test": {
                            "max_tokens": 64000,
                            "thinking": {
                                "type": "enabled",
                                "budget_tokens": 32000
                            }
                        }
                    }
                },
            },
        },
    },

But even using this "test" mode (which was successfully added) didn't change anything.
I also tested Claude Sonnet 4.5 and Opus 4 to check if it's specific to Opus 4.5, but those had the same issue.

I'll add that I used the same Vertex project with Roo Code and it used reasoning without any issues, so this shouldn't be an issue / limitation on my side.

I know this is not a lot of information to work with. If you need any additional information to help you debug this - please let me know how I can help.

Plugins

None

OpenCode version

v1.1.28

Steps to reproduce

No response

Screenshot and/or share link

https://opncd.ai/share/ha0A4Lmq

Image

Operating System

macOS / Windows 11 (2 different devices, same issue)

Terminal

Windows Terminal / iTerm / OpenCode Desktop

Activity

  1. github-actions commented on Jan 21, 2026

    @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. changed the title [-]Reasoning Doesn't Work Claude Models on GCP Vertex[/-] [+]Reasoning Doesn't Work for Claude Models through Vertex Provider[/+] on Jan 21, 2026
  3. rekram1-node commented on Jan 22, 2026

    @rekram1-node
    Contributor

    this should be fairly straight forward to fix, i hope will look

  4. added a commit that references this issue on Jan 22, 2026
    86d1535
  5. koverholt commented on Jan 23, 2026

    @koverholt

    Thanks for the issue and the fix! I tried with OpenCode v1.1.34 and I'm still not seeing thinking with Claude Opus 4.5 via Vertex Anthropic (with /thinking enabled and variant set to high).

    I think the npm string in #9953 should be @ai-sdk/google-vertex instead of @ai-sdk/google-vertex/anthropic based on the models.dev data?

    $ jq '."google-vertex-anthropic" | {id, npm, name}' ~/.cache/opencode/models.json
    
    {
      "id": "google-vertex-anthropic",
      "npm": "@ai-sdk/google-vertex",
      "name": "Vertex (Anthropic)"
    }
    
  6. MichaelYochpaz commented on Jan 23, 2026

    @MichaelYochpaz
    ContributorAuthor

    @rekram1-node I also just tested v1.1.34 and reasoning is still not working.
    cc @zerone0x

  7. MichaelYochpaz commented on Jan 24, 2026

    @MichaelYochpaz
    ContributorAuthor

    Opened #10442.
    Tested locally and I can see thinking properly using Opus on Vertex following these changes :)

  8. MichaelYochpaz commented on Jan 26, 2026

    @MichaelYochpaz
    ContributorAuthor

    Hey @rekram1-node, just tested version 1.1.36 - reasoning still doesn't work on Vertex.
    I suspect that this is because of this line I initially added that was removed before merging, which was part of the fix.

    if (provider.id === "google-vertex-anthropic") return "@ai-sdk/google-vertex/anthropic"

    I'd also recommend keeping the tests (or at least some of them), since they probably would've helped noticing that problem by failing if someone removes this line.

  9. r-bit-rry commented on Jan 27, 2026

    @r-bit-rry

    Please merge

  10. MichaelYochpaz commented on Jan 31, 2026

    @MichaelYochpaz
    ContributorAuthor

    Just tested, and can confirm reasoning works now for Anthropic models through Vertex, following the merge of anomalyco/models.dev#717 and running opencode models --refresh.

    Thanks!

  11. rekram1-node commented on Jan 31, 2026

    @rekram1-node
    Contributor

    thanks for ur prs @MichaelYochpaz apologies for delays it is super hard to see things rn due to sheer volume

  12. koverholt commented on Jan 31, 2026

    @koverholt

    Same here, confirming that thinking is working now for Anthropic Vertex models. Thanks all for pushing this through! ❤️

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions