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

Closed
opened 2026-02-16 18:06:12 -05:00 by yindo · 10 comments
Owner

Originally created by @MichaelYochpaz on GitHub (Jan 21, 2026).

Originally assigned to: @thdxr on GitHub.

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

Originally created by @MichaelYochpaz on GitHub (Jan 21, 2026). Originally assigned to: @thdxr on GitHub. ### 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: ```json "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 <img width="1252" height="852" alt="Image" src="https://github.com/user-attachments/assets/46b69988-57c8-4c51-9f1e-648129df60a9" /> ### Operating System macOS / Windows 11 (2 different devices, same issue) ### Terminal Windows Terminal / iTerm / OpenCode Desktop
yindo added the bug label 2026-02-16 18:06:12 -05:00
yindo closed this issue 2026-02-16 18:06:12 -05:00
Author
Owner

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

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

  • #6864: No reasoning at all through Github Copilot provider (similar reasoning not being retrieved even with proper config)
  • #6768: No Chain of Thought retrieved if Provider lacks support, despite 'thinkmode' config (reasoning config being ignored by provider)
  • #8789: Desktop GUI - Thinking process disappears and cannot be viewed in detail (thinking content not persisting)
  • #9565: Incorrect model IDs for Vertex Anthropic (Vertex Anthropic provider configuration issues)
  • #7514: Bug: Shared state between google-vertex and google-vertex-anthropic providers (Vertex AI provider conflicts)

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

@github-actions[bot] commented on GitHub (Jan 21, 2026): This issue might be a duplicate of existing issues. Please check: - #6864: No reasoning at all through Github Copilot provider (similar reasoning not being retrieved even with proper config) - #6768: No Chain of Thought retrieved if Provider lacks support, despite 'thinkmode' config (reasoning config being ignored by provider) - #8789: Desktop GUI - Thinking process disappears and cannot be viewed in detail (thinking content not persisting) - #9565: Incorrect model IDs for Vertex Anthropic (Vertex Anthropic provider configuration issues) - #7514: Bug: Shared state between google-vertex and google-vertex-anthropic providers (Vertex AI provider conflicts) Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Jan 21, 2026):

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

@rekram1-node commented on GitHub (Jan 21, 2026): this should be fairly straight forward to fix, i hope will look
Author
Owner

@koverholt commented on GitHub (Jan 23, 2026):

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)"
}
@koverholt commented on GitHub (Jan 23, 2026): 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)" } ```
Author
Owner

@MichaelYochpaz commented on GitHub (Jan 23, 2026):

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

@MichaelYochpaz commented on GitHub (Jan 23, 2026): @rekram1-node I also just tested v1.1.34 and reasoning is still not working. cc @zerone0x
Author
Owner

@MichaelYochpaz commented on GitHub (Jan 24, 2026):

Opened https://github.com/anomalyco/opencode/pull/10442.
Tested locally and I can see thinking properly using Opus on Vertex following these changes :)

@MichaelYochpaz commented on GitHub (Jan 24, 2026): Opened https://github.com/anomalyco/opencode/pull/10442. Tested locally and I can see thinking properly using Opus on Vertex following these changes :)
Author
Owner

@MichaelYochpaz commented on GitHub (Jan 26, 2026):

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.

@MichaelYochpaz commented on GitHub (Jan 26, 2026): 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](https://github.com/anomalyco/opencode/pull/10442/changes/ea3e0d1be46c3e7fea0c128b23b0174a227dcbe7#diff-b0155a9e5561043f50ba86bc54d5fd59aa528c7af7c92b2f37585d80e792cd9aL606) I initially added that was removed before merging, which was part of the fix. ```python 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.
Author
Owner

@r-bit-rry commented on GitHub (Jan 27, 2026):

Please merge

@r-bit-rry commented on GitHub (Jan 27, 2026): Please merge
Author
Owner

@MichaelYochpaz commented on GitHub (Jan 30, 2026):

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

Thanks!

@MichaelYochpaz commented on GitHub (Jan 30, 2026): Just tested, and can confirm reasoning works now for Anthropic models through Vertex, following the merge of https://github.com/anomalyco/models.dev/pull/717 and running `opencode models --refresh`. Thanks!
Author
Owner

@rekram1-node commented on GitHub (Jan 30, 2026):

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

@rekram1-node commented on GitHub (Jan 30, 2026): thanks for ur prs @MichaelYochpaz apologies for delays it is super hard to see things rn due to sheer volume
Author
Owner

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

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

@koverholt commented on GitHub (Jan 31, 2026): Same here, confirming that thinking is working now for Anthropic Vertex models. Thanks all for pushing this through! ❤️
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7110