Skip to content

Conversation

@MichaelYochpaz
Copy link

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

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

1 participant