Skip to content

feat: add Vertex AI provider for enterprise grade GCP integration#228

Closed
realtusharnargunde wants to merge 4 commits into
langchain-ai:mainfrom
realtusharnargunde:feat/vertexai-support
Closed

feat: add Vertex AI provider for enterprise grade GCP integration#228
realtusharnargunde wants to merge 4 commits into
langchain-ai:mainfrom
realtusharnargunde:feat/vertexai-support

Conversation

@realtusharnargunde

Copy link
Copy Markdown

Enhance OpenWiki to allow Enterprise level readiness via Google Vertex AI integration. As a supported provider, Vertex AI will help enable Claude models via GCP's Model Garden. This allows organizations on GCP to use OpenWiki with their existing cloud infrastructure.

Requirement : How Vertex AI Helps

  1. Unified billing : AI costs on existing GCP invoices
  2. IAM integration : Fine-grained access control, audit logs
  3. No new vendor : Use already-approved cloud provider

Usage details. :

For local development :

One-time setup

gcloud auth application-default login

Run OpenWiki

OPENWIKI_PROVIDER=vertexai
ANTHROPIC_VERTEX_PROJECT_ID=my-project
CLOUD_ML_REGION=us-east5
openwiki --init

Interactive Setup

openwiki # Select "Vertex AI" provider, press Enter to use ADC

For CI/CD Setup - work with org policies to facilitate appropriate usage

Vertex AI authentication in CI/CD depends on your organization's policies:

  • Workload Identity Federation (recommended) — keyless auth from GitHub/GitLab
  • Service Account Key ( best for PoC ) — if allowed by org policy

Testing :
Screenshot 2026-07-08 at 6 47 46 PM

Tushar Nargunde and others added 4 commits July 8, 2026 15:16
Vertex AI can use Application Default Credentials (ADC) without
requiring GOOGLE_APPLICATION_CREDENTIALS to be explicitly set.
This fixes non-interactive runs that were incorrectly requiring
the env var even when ADC is available.
Switch from @langchain/google-vertexai (Gemini) to @anthropic-ai/vertex-sdk
(Claude) for the vertexai provider. This enables Claude models via Google
Cloud's Vertex AI Model Garden.

- Replace @langchain/google-vertexai with @anthropic-ai/vertex-sdk
- Use ChatAnthropic with AnthropicVertex client for Vertex AI
- Update model options to Claude (Sonnet 4.6, Haiku 4.5, Opus 4.8)
- Update tests to reflect Claude model defaults
@SadriG91

SadriG91 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Heads-up: #179 (opened Jul 7) implements the same thing — Claude models via Vertex AI with ADC auth — so maintainers may want to look at the two together. The main design differences, for easier triage:

  • Env vars: feat: add google vertex ai (claude) provider #179 uses the standard GCP names (GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_LOCATION) passed explicitly to the AnthropicVertex client, rather than the Anthropic-SDK-specific ANTHROPIC_VERTEX_PROJECT_ID / CLOUD_ML_REGION — the standard names line up with gcloud, workload-identity CI setups, and other GCP tooling out of the box.
  • Default endpoint: feat: add google vertex ai (claude) provider #179 defaults the location to global (overridable) for availability, rather than a regional example.
  • feat: add google vertex ai (claude) provider #179 also carries the README + openwiki/ doc updates, onboarding steps for project/location, tests across constants/env/commands, and a documented live E2E against a GCP project, and it's currently rebased conflict-free on 0.0.4.

Happy to consolidate in either direction — if there are ideas here that #179 is missing, I'll gladly fold them in.

@ppsplus-bradh

Copy link
Copy Markdown
Contributor

Coordination pointer: this overlaps a few other in-flight Vertex PRs — #154 adds Vertex as a gemini-enterprise provider that routes Gemini/Gemma + Claude + Llama/Mistral/DeepSeek/Qwen (MaaS) through one provider via resolveVertexSurface(), #179 adds a dedicated Vertex Claude provider, and #238 adds Vertex + Bedrock. All touch src/constants.ts, src/agent/index.ts, and src/credentials.tsx, so first-to-land will conflict with the others.

Summary of how they relate: #154 (comment) — raising it so the maintainers can settle on one Vertex direction. Happy to help consolidate.

@realtusharnargunde

Copy link
Copy Markdown
Author

Closing this PR based on direction and progress on others. Cheers

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.

3 participants