Skip to content

feat: Vertex AI support; add google-vertex and google-vertex-anthropic providers#2347

Merged
thdxr merged 5 commits intoanomalyco:devfrom
yuku-contrib:dev
Oct 4, 2025
Merged

feat: Vertex AI support; add google-vertex and google-vertex-anthropic providers#2347
thdxr merged 5 commits intoanomalyco:devfrom
yuku-contrib:dev

Conversation

@yukukotani
Copy link
Contributor

@yukukotani yukukotani commented Sep 1, 2025

Fix #272

Summary

  • Add google-vertex provider with ADC-based autoload (project/location from env)
  • Add google-vertex-anthropic provider to surface Anthropic Claude models via Vertex
  • Patch dynamic import to load @ai-sdk/google-vertex/anthropic subpath under Bun

Details

  • Autoload when GOOGLE_CLOUD_PROJECT (or GCP_PROJECT/GCLOUD_PROJECT) is present; uses GOOGLE_CLOUD_LOCATION or VERTEX_LOCATION (default us-central1)
  • CLI auth guidance for Vertex (ADC / gcloud ADC)
  • Dev dependency: @ai-sdk/google-vertex for typing; runtime still installs dynamically

Motivation

Unify Bedrock-like experience for Vertex: environment-based detection, seamless model listing (incl. Claude on Vertex) and minimal config.

Impact

  • No breaking changes; providers are additive
  • If Vertex env vars exist, providers will appear in list

Testing

  • Typecheck passes
  • Manual verification of model listing and selections under Vertex envs

@yukukotani yukukotani changed the title Add support for Google Vertex AI core: Vertex AI support; add google-vertex and google-vertex-anthropic providers Sep 1, 2025
@yukukotani yukukotani changed the title core: Vertex AI support; add google-vertex and google-vertex-anthropic providers feat: Vertex AI support; add google-vertex and google-vertex-anthropic providers Sep 1, 2025
@phase7
Copy link

phase7 commented Sep 18, 2025

Thanks for taking care of this one, eagerly waiting for this to get merged 🙏🏽

@rawwerks
Copy link

rawwerks commented Oct 1, 2025

this would be really handy to have! maybe opencode can take care of it?

@rawwerks
Copy link

rawwerks commented Oct 2, 2025

(and especially with gemini 3 dropping next week)

@rochacbruno
Copy link

thanks for this PR! I am waiting for this merge, so my team can try opencode.

@thdxr
Copy link
Contributor

thdxr commented Oct 3, 2025

will merge this weekend

@yukukotani yukukotani force-pushed the dev branch 3 times, most recently from e427c00 to cb9b8a0 Compare October 4, 2025 00:23
@yukukotani
Copy link
Contributor Author

Ready

@thdxr thdxr merged commit e7b6ffb into anomalyco:dev Oct 4, 2025
3 checks passed
veracioux pushed a commit to veracioux/opencode that referenced this pull request Oct 10, 2025
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.

Supporting Vertex-based models using google auth

5 participants