Skip to content

fix(google-vertex-anthropic): Fix incorrect NPM package used for Anthropic models used through Vertex#717

Merged
rekram1-node merged 1 commit intoanomalyco:devfrom
MichaelYochpaz:fix-vertex-anthropic-npm-import
Jan 30, 2026
Merged

fix(google-vertex-anthropic): Fix incorrect NPM package used for Anthropic models used through Vertex#717
rekram1-node merged 1 commit intoanomalyco:devfrom
MichaelYochpaz:fix-vertex-anthropic-npm-import

Conversation

@MichaelYochpaz
Copy link
Contributor

Summary

Fix the npm package path for the google-vertex-anthropic provider to use the correct subpath import.

Changes

  • Changed npm from @ai-sdk/google-vertex to @ai-sdk/google-vertex/anthropic in providers/google-vertex-anthropic/provider.toml

Context

The google-vertex-anthropic provider requires the /anthropic subpath import from @ai-sdk/google-vertex for Claude models on Vertex AI to work correctly (Official docs reference).

Without this fix, thinking/reasoning capabilities don't work because:

  1. The SDK key is incorrectly resolved to "google" instead of "anthropic"
  2. Anthropic-specific message transforms (caching, thinking options) are not applied
  3. The providerOptions get wrapped with the wrong key

This fixes anomalyco/opencode#9894

… package

The google-vertex-anthropic provider requires the `/anthropic` subpath import for thinking/reasoning to work correctly with Claude models on Vertex AI.
@MichaelYochpaz
Copy link
Contributor Author

Hey @rekram1-node, sorry for the tag, but I (and anyone else using Vertex for Anthropic models) can't utilize Anthropic's models to their full capabilities with reasoning enabled without this issue fixed, and I use OpenCode daily for work.
Would appreciate if we could get it merged ASAP.

If there is anything you need me to change on the PR let me know.

@MichaelYochpaz
Copy link
Contributor Author

@thdxr / @fwang Sorry for the tags, but this is a simple fix for an issue that really degrades the results of OpenCode (thinking / reasoning does not work). Could one of you perhaps take a look?

@rekram1-node rekram1-node merged commit c6870e9 into anomalyco:dev Jan 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reasoning Doesn't Work for Claude Models through Vertex Provider

2 participants