[PR #2347] feat: Vertex AI support; add google-vertex and google-vertex-anthropic providers #10284

Closed
opened 2026-02-16 18:14:54 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/2347

State: closed
Merged: Yes


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
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/2347 **State:** closed **Merged:** Yes --- 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
yindo added the pull-request label 2026-02-16 18:14:54 -05:00
yindo closed this issue 2026-02-16 18:14:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10284