feat: add google vertex ai (claude) provider#179
Conversation
|
Heads-up on some convergence: the AWS Bedrock PRs (#185, #96, and #40 for issue #56) generalize the same thing this PR does for Vertex — credential gating for providers that don't authenticate with a single API key.
The two shapes enable the same thing, so whichever pattern maintainers prefer for keyless/cloud-credential providers, this change adapts trivially — happy to rebase onto the Bedrock abstraction if one of those lands first (or they can rebase onto this one; the vertex entry would translate to |
ad8ab66 to
6fd5afa
Compare
|
SadriG91 nice PR — we independently landed on the exact same How it overlaps with #154: #154 (Gemini + Gemini Enterprise) also does Claude-on-Vertex, but as one part of a broader Where your PR is cleaner: the key-less-provider abstraction ( One heads-up that affects Offer: happy to consolidate whichever direction the maintainers prefer — either fold your key-less-provider abstraction into #154's model-family routing, or rebase #154's Gemini + MaaS routing on top of #179. I'll do the merge work either way. Deferring to the maintainers on the naming question too ( |
|
Thanks Brad Huffman (@ppsplus-bradh) — this is exactly the kind of cross-PR review this repo needs right now, and your credentials heads-up was a real catch. Verified and fixed. I reproduced it against a live Vertex project: a stray On consolidation: I'd take you up on the second direction — land #179 first, then rebase #154's Gemini + MaaS family routing on top of it. Reasoning: this repo's CONTRIBUTING pushes hard for one-change PRs, and #179 is the smallest reviewable unit (the key-less-provider abstraction + the Claude path, which has now had multiple live end-to-end runs including a full Naming: happy to defer to maintainers. One consideration for them: a |
a06156b to
17d08ab
Compare
The blank-region default of us-central1 returns 400 'Model not servable in region' for Anthropic Claude on Vertex. 'global' serves both Gemini and the Claude surface. MaaS partner models remain region-specific, so those users set GOOGLE_CLOUD_LOCATION explicitly. Flagged by @SadriG91 on langchain-ai#154 (also addressed in langchain-ai#179). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
17d08ab to
c44e272
Compare
|
SadriG91 - thanks for the PR! Taking a look. |
| const retryOptions = { maxRetries: providerRetryAttempts }; | ||
|
|
||
| if (provider === "vertex") { | ||
| return new ChatAnthropic(modelId, { |
There was a problem hiding this comment.
i think we need to pass retryOptions here
There was a problem hiding this comment.
Good catch — added, now 55d868f after rebasing over the Bedrock/Nebius merges, so vertex honors OPENWIKI_PROVIDER_RETRY_ATTEMPTS like the other providers. Re-ran the full suite (typecheck, lint, 260 tests) and a live smoke test against Vertex on the global endpoint — all green.
Colin Francis (colifran)
left a comment
There was a problem hiding this comment.
Looks great SadriG91! I think we need to pass in retryOptions but good to merge after that. I have a PR open to fix the audit issue in CI.
Adds a 'vertex' provider that runs Anthropic Claude models through Google Vertex AI, authenticated with Application Default Credentials (no API key): ChatAnthropic with a custom AnthropicVertex client (@anthropic-ai/vertex-sdk) via the documented createClient option. - constants: vertex provider entry (Haiku/Sonnet/Opus on Vertex), apiKeyEnvKey made optional, new getMissingProviderEnvKey / resolveProviderLocation / getProviderCredentialHint helpers; isValidModelId now accepts @-versioned Vertex model IDs - agent: vertex branch in createModel; ensureProviderKey generalized to ensureProviderCredentials - onboarding: GCP project (required) and location (optional, defaults to global) steps replace the API-key step for vertex - env: GOOGLE_CLOUD_PROJECT / GOOGLE_CLOUD_LOCATION / GOOGLE_APPLICATION_CREDENTIALS managed and shown in diagnostics - cli: credential gates report the missing env key with an ADC hint; invalid-provider message now derived from SELECTABLE_OPENWIKI_PROVIDERS - tests, README, and openwiki/ docs updated
…ient The Anthropic SDK captures ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN from the environment at client construction and sends them as request credentials, displacing the Google OAuth token (reproduced: a stray ANTHROPIC_AUTH_TOKEN fails Vertex auth — e.g. left over from a previous anthropic-provider setup). Construct AnthropicVertex with both masked, then restore them.
4105b3e to
55d868f
Compare
|
Thanks for the review Colin Francis (@colifran)! Two updates since:
Saw the Trivy audit fix landed too (#338), so CI should be fully green on re-run. Ready when you are. |
Colin Francis (colifran)
left a comment
There was a problem hiding this comment.
Great job! Thanks SadriG91!
…enterprise Add two Google model providers and route the Vertex AI (now Gemini Enterprise) Model Garden through a single provider: - `gemini` (AI Studio): Google's Gemini models via one API key (GEMINI_API_KEY). - `gemini-enterprise` (Vertex AI): keyless, ADC-authenticated provider that routes each model ID to the right Model Garden surface — native Gemini/Gemma over generateContent, Claude over the Anthropic Vertex SDK, and partner/open-weight models over the OpenAI-compatible MaaS endpoint (resolveVertexSurface / createGeminiEnterpriseModel). This supersedes the discrete `vertex` (Claude-only) provider added in langchain-ai#179: `gemini-enterprise` reaches Claude on Vertex through the same AnthropicVertex construction and ANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKEN env-neutralization, plus publisher-path stripping, so no capability is lost. The rename tracks Google's Cloud Next 2026 rebrand of Vertex AI to the Gemini Enterprise Agent Platform while keeping the unchanged underlying API surface. Builds on langchain-ai#179's keyless-provider plumbing (projectEnvKey/locationEnvKey/ defaultLocation, getMissingProviderEnvKey, resolveProviderLocation, getProviderCredentialHint) and its gcp-project/gcp-location onboarding steps, which gemini-enterprise inherits — dropping langchain-ai#154's earlier approach of overloading apiKeyEnvKey to carry the non-secret GOOGLE_CLOUD_PROJECT. Gemini uses disableStreaming + outputVersion "v0" to preserve Gemini 3.x thought signatures across multi-turn tool calls (see the comment in createGeminiEnterpriseModel). Co-Authored-By: Claude <noreply@anthropic.com>
…enterprise Add two Google model providers and route the Vertex AI (now Gemini Enterprise) Model Garden through a single provider: - `gemini` (AI Studio): Google's Gemini models via one API key (GEMINI_API_KEY). - `gemini-enterprise` (Vertex AI): keyless, ADC-authenticated provider that routes each model ID to the right Model Garden surface — native Gemini/Gemma over generateContent, Claude over the Anthropic Vertex SDK, and partner/open-weight models over the OpenAI-compatible MaaS endpoint (resolveVertexSurface / createGeminiEnterpriseModel). This supersedes the discrete `vertex` (Claude-only) provider added in langchain-ai#179: `gemini-enterprise` reaches Claude on Vertex through the same AnthropicVertex construction and ANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKEN env-neutralization, plus publisher-path stripping, so no capability is lost. The rename tracks Google's Cloud Next 2026 rebrand of Vertex AI to the Gemini Enterprise Agent Platform while keeping the unchanged underlying API surface. Builds on langchain-ai#179's keyless-provider plumbing (projectEnvKey/locationEnvKey/ defaultLocation, getMissingProviderEnvKey, resolveProviderLocation, getProviderCredentialHint) and its gcp-project/gcp-location onboarding steps, which gemini-enterprise inherits — dropping langchain-ai#154's earlier approach of overloading apiKeyEnvKey to carry the non-secret GOOGLE_CLOUD_PROJECT. Gemini uses disableStreaming + outputVersion "v0" to preserve Gemini 3.x thought signatures across multi-turn tool calls (shared GEMINI_THOUGHT_SIGNATURE_OPTIONS across both ChatGoogle surfaces). The MaaS endpoint and the Gemini surface both special-case the `global` location: MaaS uses the unprefixed aiplatform.googleapis.com host, and the Gemini surface strips a publisher-pathed ID to the bare model the generateContent surface expects. resolveVertexSurface lists `codellama` explicitly so bare codellama-* IDs route to MaaS. Co-Authored-By: Claude <noreply@anthropic.com>
…enterprise Add two Google model providers and route the Vertex AI (now Gemini Enterprise) Model Garden through a single provider: - `gemini` (AI Studio): Google's Gemini models via one API key (GEMINI_API_KEY). - `gemini-enterprise` (Vertex AI): keyless, ADC-authenticated provider that routes each model ID to the right Model Garden surface — native Gemini/Gemma over generateContent, Claude over the Anthropic Vertex SDK, and partner/open-weight models over the OpenAI-compatible MaaS endpoint (resolveVertexSurface / createGeminiEnterpriseModel). This supersedes the discrete `vertex` (Claude-only) provider added in langchain-ai#179: `gemini-enterprise` reaches Claude on Vertex through the same AnthropicVertex construction and ANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKEN env-neutralization, plus publisher-path stripping, so no capability is lost. The rename tracks Google's Cloud Next 2026 rebrand of Vertex AI to the Gemini Enterprise Agent Platform while keeping the unchanged underlying API surface. Builds on langchain-ai#179's keyless-provider plumbing (projectEnvKey/locationEnvKey/ defaultLocation, getMissingProviderEnvKey, resolveProviderLocation, getProviderCredentialHint) and its gcp-project/gcp-location onboarding steps, which gemini-enterprise inherits — dropping langchain-ai#154's earlier approach of overloading apiKeyEnvKey to carry the non-secret GOOGLE_CLOUD_PROJECT. Gemini uses disableStreaming + outputVersion "v0" to preserve Gemini 3.x thought signatures across multi-turn tool calls (shared GEMINI_THOUGHT_SIGNATURE_OPTIONS across both ChatGoogle surfaces). The MaaS endpoint and the Gemini surface both special-case the `global` location: MaaS uses the unprefixed aiplatform.googleapis.com host, and the Gemini surface strips a publisher-pathed ID to the bare model the generateContent surface expects. resolveVertexSurface lists `codellama` explicitly so bare codellama-* IDs route to MaaS. Co-Authored-By: Claude <noreply@anthropic.com>
…ers with vertex model-family routing (#154) * feat: add Gemini providers and consolidate Vertex Claude into gemini-enterprise Add two Google model providers and route the Vertex AI (now Gemini Enterprise) Model Garden through a single provider: - `gemini` (AI Studio): Google's Gemini models via one API key (GEMINI_API_KEY). - `gemini-enterprise` (Vertex AI): keyless, ADC-authenticated provider that routes each model ID to the right Model Garden surface — native Gemini/Gemma over generateContent, Claude over the Anthropic Vertex SDK, and partner/open-weight models over the OpenAI-compatible MaaS endpoint (resolveVertexSurface / createGeminiEnterpriseModel). This supersedes the discrete `vertex` (Claude-only) provider added in #179: `gemini-enterprise` reaches Claude on Vertex through the same AnthropicVertex construction and ANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKEN env-neutralization, plus publisher-path stripping, so no capability is lost. The rename tracks Google's Cloud Next 2026 rebrand of Vertex AI to the Gemini Enterprise Agent Platform while keeping the unchanged underlying API surface. Builds on #179's keyless-provider plumbing (projectEnvKey/locationEnvKey/ defaultLocation, getMissingProviderEnvKey, resolveProviderLocation, getProviderCredentialHint) and its gcp-project/gcp-location onboarding steps, which gemini-enterprise inherits — dropping #154's earlier approach of overloading apiKeyEnvKey to carry the non-secret GOOGLE_CLOUD_PROJECT. Gemini uses disableStreaming + outputVersion "v0" to preserve Gemini 3.x thought signatures across multi-turn tool calls (shared GEMINI_THOUGHT_SIGNATURE_OPTIONS across both ChatGoogle surfaces). The MaaS endpoint and the Gemini surface both special-case the `global` location: MaaS uses the unprefixed aiplatform.googleapis.com host, and the Gemini surface strips a publisher-pathed ID to the bare model the generateContent surface expects. resolveVertexSurface lists `codellama` explicitly so bare codellama-* IDs route to MaaS. Co-Authored-By: Claude <noreply@anthropic.com> * test: verify provider retry attempts reach the Gemini constructors createModel now spreads ...retryOptions into every Gemini surface (the AI Studio ChatGoogle and all three gemini-enterprise clients), which previously omitted it — so OPENWIKI_PROVIDER_RETRY_ATTEMPTS was silently ignored and a 429 failed fast instead of backing off (reported by @avidspartan1 on #154). maxRetries is not a readable property on the constructed LangChain models, so this asserts it via vi.mock capturing each constructor's options (including that maxRetries: 0 propagates and the AI Studio API key reaches ChatGoogle). Once maxRetries is wired through, @langchain/core's AsyncCaller already honors a server-provided Retry-After (up to 60s), so the existing backoff engages. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
…fixes fix (#357) * ci: fix repository posture checks * feat: Add trending repo badge to readme (#347) * chore(deps): bump the major group with 5 updates (#348) Bumps the major group with 5 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4` | `7` | | [pnpm/action-setup](https://github.com/pnpm/action-setup) | `4.3.0` | `6.0.9` | | [actions/setup-node](https://github.com/actions/setup-node) | `4` | `7` | | [github/codeql-action](https://github.com/github/codeql-action) | `3` | `4` | | [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) | `7.0.11` | `8.1.1` | Updates `actions/checkout` from 4 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v7) Updates `pnpm/action-setup` from 4.3.0 to 6.0.9 - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](pnpm/action-setup@b906aff...0ebf471) Updates `actions/setup-node` from 4 to 7 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v4...v7) Updates `github/codeql-action` from 3 to 4 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v3...v4) Updates `peter-evans/create-pull-request` from 7.0.11 to 8.1.1 - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](peter-evans/create-pull-request@22a9089...5f6978f) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: pnpm/action-setup dependency-version: 6.0.9 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: actions/setup-node dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: github/codeql-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: peter-evans/create-pull-request dependency-version: 8.1.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Colin Francis <131073567+colifran@users.noreply.github.com> * feat: add gemini (ai studio) and gemini enterprise (vertex ai) providers with vertex model-family routing (#154) * feat: add Gemini providers and consolidate Vertex Claude into gemini-enterprise Add two Google model providers and route the Vertex AI (now Gemini Enterprise) Model Garden through a single provider: - `gemini` (AI Studio): Google's Gemini models via one API key (GEMINI_API_KEY). - `gemini-enterprise` (Vertex AI): keyless, ADC-authenticated provider that routes each model ID to the right Model Garden surface — native Gemini/Gemma over generateContent, Claude over the Anthropic Vertex SDK, and partner/open-weight models over the OpenAI-compatible MaaS endpoint (resolveVertexSurface / createGeminiEnterpriseModel). This supersedes the discrete `vertex` (Claude-only) provider added in #179: `gemini-enterprise` reaches Claude on Vertex through the same AnthropicVertex construction and ANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKEN env-neutralization, plus publisher-path stripping, so no capability is lost. The rename tracks Google's Cloud Next 2026 rebrand of Vertex AI to the Gemini Enterprise Agent Platform while keeping the unchanged underlying API surface. Builds on #179's keyless-provider plumbing (projectEnvKey/locationEnvKey/ defaultLocation, getMissingProviderEnvKey, resolveProviderLocation, getProviderCredentialHint) and its gcp-project/gcp-location onboarding steps, which gemini-enterprise inherits — dropping #154's earlier approach of overloading apiKeyEnvKey to carry the non-secret GOOGLE_CLOUD_PROJECT. Gemini uses disableStreaming + outputVersion "v0" to preserve Gemini 3.x thought signatures across multi-turn tool calls (shared GEMINI_THOUGHT_SIGNATURE_OPTIONS across both ChatGoogle surfaces). The MaaS endpoint and the Gemini surface both special-case the `global` location: MaaS uses the unprefixed aiplatform.googleapis.com host, and the Gemini surface strips a publisher-pathed ID to the bare model the generateContent surface expects. resolveVertexSurface lists `codellama` explicitly so bare codellama-* IDs route to MaaS. Co-Authored-By: Claude <noreply@anthropic.com> * test: verify provider retry attempts reach the Gemini constructors createModel now spreads ...retryOptions into every Gemini surface (the AI Studio ChatGoogle and all three gemini-enterprise clients), which previously omitted it — so OPENWIKI_PROVIDER_RETRY_ATTEMPTS was silently ignored and a 429 failed fast instead of backing off (reported by @avidspartan1 on #154). maxRetries is not a readable property on the constructed LangChain models, so this asserts it via vi.mock capturing each constructor's options (including that maxRetries: 0 propagates and the AI Studio API key reaches ChatGoogle). Once maxRetries is wired through, @langchain/core's AsyncCaller already honors a server-provided Retry-After (up to 60s), so the existing backoff engages. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> * bump deepagents to 1.11.0 to restore execute tool via routePrefixes fix --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: John Kennedy <65985482+jkennedyvz@users.noreply.github.com> Co-authored-by: Brace Sproul <braceasproul@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brad Huffman <brad.huffman@wellsky.com> Co-authored-by: Claude <noreply@anthropic.com>
* feat: Add support for OKF via prompting (#321) * feat: Add support for OKF via prompting * Apply suggestions from code review Co-authored-by: Brace Sproul <braceasproul@gmail.com> * cr * feat: OKF index.md files (#323) * feat: Add support for OKF via prompting * feat: OKF index.md files * Apply suggestions from code review Co-authored-by: Brace Sproul <braceasproul@gmail.com> * cr * cr * cr * docs: document index middleware helpers * Update src/agent/prompt.ts * cr * make interface * drop unnecc type * feat: Add OKF front matter validator (#324) * feat: Add support for OKF via prompting * feat: OKF index.md files * Apply suggestions from code review Co-authored-by: Brace Sproul <braceasproul@gmail.com> * cr * feat: Add OKF front matter validator * cr * cr * docs: document frontmatter validator helpers * docs: document index middleware helpers * Update src/agent/prompt.ts * cr * make interface * drop unnecc type * cr * cr * interfaces * cr * cr * feat: OKF update wiki skill (#339) * feat: Add support for OKF via prompting * feat: OKF index.md files * Apply suggestions from code review Co-authored-by: Brace Sproul <braceasproul@gmail.com> * cr * feat: Add OKF front matter validator * cr * cr * docs: document frontmatter validator helpers * docs: document index middleware helpers * Update src/agent/prompt.ts * cr * make interface * drop unnecc type * cr * cr * interfaces * cr * feat: OKF update wiki skill * update version * fix: Writing skills (#351) * fix: prompt agent to write one to two sentence desc instead of just one (#353) * fix: Better description prompting (#354) * fix: Better description prompting * cr * cr * feat: implement cli telemetry (#325) * feat: implement anonymous cli telemetry for run events * lock file * chore: bump deepagents to 1.11.0 to restore execute tool via routePrefixes fix (#357) * ci: fix repository posture checks * feat: Add trending repo badge to readme (#347) * chore(deps): bump the major group with 5 updates (#348) Bumps the major group with 5 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4` | `7` | | [pnpm/action-setup](https://github.com/pnpm/action-setup) | `4.3.0` | `6.0.9` | | [actions/setup-node](https://github.com/actions/setup-node) | `4` | `7` | | [github/codeql-action](https://github.com/github/codeql-action) | `3` | `4` | | [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) | `7.0.11` | `8.1.1` | Updates `actions/checkout` from 4 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4...v7) Updates `pnpm/action-setup` from 4.3.0 to 6.0.9 - [Release notes](https://github.com/pnpm/action-setup/releases) - [Commits](pnpm/action-setup@b906aff...0ebf471) Updates `actions/setup-node` from 4 to 7 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v4...v7) Updates `github/codeql-action` from 3 to 4 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v3...v4) Updates `peter-evans/create-pull-request` from 7.0.11 to 8.1.1 - [Release notes](https://github.com/peter-evans/create-pull-request/releases) - [Commits](peter-evans/create-pull-request@22a9089...5f6978f) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: pnpm/action-setup dependency-version: 6.0.9 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: actions/setup-node dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: github/codeql-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: major - dependency-name: peter-evans/create-pull-request dependency-version: 8.1.1 dependency-type: direct:production update-type: version-update:semver-major dependency-group: major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Colin Francis <131073567+colifran@users.noreply.github.com> * feat: add gemini (ai studio) and gemini enterprise (vertex ai) providers with vertex model-family routing (#154) * feat: add Gemini providers and consolidate Vertex Claude into gemini-enterprise Add two Google model providers and route the Vertex AI (now Gemini Enterprise) Model Garden through a single provider: - `gemini` (AI Studio): Google's Gemini models via one API key (GEMINI_API_KEY). - `gemini-enterprise` (Vertex AI): keyless, ADC-authenticated provider that routes each model ID to the right Model Garden surface — native Gemini/Gemma over generateContent, Claude over the Anthropic Vertex SDK, and partner/open-weight models over the OpenAI-compatible MaaS endpoint (resolveVertexSurface / createGeminiEnterpriseModel). This supersedes the discrete `vertex` (Claude-only) provider added in #179: `gemini-enterprise` reaches Claude on Vertex through the same AnthropicVertex construction and ANTHROPIC_API_KEY/ANTHROPIC_AUTH_TOKEN env-neutralization, plus publisher-path stripping, so no capability is lost. The rename tracks Google's Cloud Next 2026 rebrand of Vertex AI to the Gemini Enterprise Agent Platform while keeping the unchanged underlying API surface. Builds on #179's keyless-provider plumbing (projectEnvKey/locationEnvKey/ defaultLocation, getMissingProviderEnvKey, resolveProviderLocation, getProviderCredentialHint) and its gcp-project/gcp-location onboarding steps, which gemini-enterprise inherits — dropping #154's earlier approach of overloading apiKeyEnvKey to carry the non-secret GOOGLE_CLOUD_PROJECT. Gemini uses disableStreaming + outputVersion "v0" to preserve Gemini 3.x thought signatures across multi-turn tool calls (shared GEMINI_THOUGHT_SIGNATURE_OPTIONS across both ChatGoogle surfaces). The MaaS endpoint and the Gemini surface both special-case the `global` location: MaaS uses the unprefixed aiplatform.googleapis.com host, and the Gemini surface strips a publisher-pathed ID to the bare model the generateContent surface expects. resolveVertexSurface lists `codellama` explicitly so bare codellama-* IDs route to MaaS. Co-Authored-By: Claude <noreply@anthropic.com> * test: verify provider retry attempts reach the Gemini constructors createModel now spreads ...retryOptions into every Gemini surface (the AI Studio ChatGoogle and all three gemini-enterprise clients), which previously omitted it — so OPENWIKI_PROVIDER_RETRY_ATTEMPTS was silently ignored and a 429 failed fast instead of backing off (reported by @avidspartan1 on #154). maxRetries is not a readable property on the constructed LangChain models, so this asserts it via vi.mock capturing each constructor's options (including that maxRetries: 0 propagates and the AI Studio API key reaches ChatGoogle). Once maxRetries is wired through, @langchain/core's AsyncCaller already honors a server-provided Retry-After (up to 60s), so the existing backoff engages. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com> * bump deepagents to 1.11.0 to restore execute tool via routePrefixes fix --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: John Kennedy <65985482+jkennedyvz@users.noreply.github.com> Co-authored-by: Brace Sproul <braceasproul@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brad Huffman <brad.huffman@wellsky.com> Co-authored-by: Claude <noreply@anthropic.com> * fix: Better relationship prompting (#359) * chore: Update openwiki to be OKF compliant (#355) * chore: Update openwiki to be OKF compliant * add index files * cr --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Colin Francis <131073567+colifran@users.noreply.github.com> Co-authored-by: John Kennedy <65985482+jkennedyvz@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Brad Huffman <brad.huffman@wellsky.com> Co-authored-by: Claude <noreply@anthropic.com>
What
Adds a
vertexprovider that runs Anthropic's Claude models through Google Vertex AI, authenticated with Google Application Default Credentials — no API key:OPENWIKI_PROVIDER=vertex GOOGLE_CLOUD_PROJECT=your-gcp-project GOOGLE_CLOUD_LOCATION=global # optional, defaults to globalAuth works through the standard ADC chain:
GOOGLE_APPLICATION_CREDENTIALS(service-account key),gcloud auth application-default login, or workload identity.Why
Organizations on Google Cloud consume Claude through Vertex AI (billing, quotas, IAM, data residency) rather than a direct Anthropic API key — today OpenWiki can't use those deployments. No existing issue or PR covers Claude-on-Vertex (#154/#36 add Gemini models, a different provider path).
How
ChatAnthropicclass with its documentedcreateClientoption returning anAnthropicVertexclient from@anthropic-ai/vertex-sdk— the same message/tool-calling code path as theanthropicprovider; only authentication differs.ProviderConfig.apiKeyEnvKeybecomes optional. A newgetMissingProviderEnvKey()helper powers the agent's credential gate, both CLI non-interactive gates, andneedsCredentialSetup(), so key-less providers are handled uniformly (with an ADC hint appended to error messages).GOOGLE_CLOUD_PROJECT(required) andGOOGLE_CLOUD_LOCATION(optional; Enter keeps the softglobaldefault — nothing persisted).GOOGLE_CLOUD_PROJECT/GOOGLE_CLOUD_LOCATION/GOOGLE_APPLICATION_CREDENTIALSjoinMANAGED_ENV_KEYSand show as non-secret values in credential diagnostics.isValidModelIdnow accepts@so Vertex's versioned IDs validate (claude-haiku-4-5@20251001); Sonnet/Opus use the dateless IDs.cli.tsxis now derived fromSELECTABLE_OPENWIKI_PROVIDERS(the hardcoded list had gone stale — it was missingopenai-compatible). Heads-up: feat: add gemini (ai studio) and gemini enterprise (vertex ai) providers with vertex model-family routing #154 makes the same tidy-up, so whichever lands second has a trivial conflict there.How I tested it
pnpm run format,pnpm run lint, andpnpm testall pass (98 tests, including new coverage for the vertex config, thegetMissingProviderEnvKey/resolveProviderLocation/providerRequiresApiKeyhelpers,@-versioned model IDs through bothisValidModelIdand--modelIdparsing, and the managed env keys).OPENWIKI_PROVIDER=vertexand noGOOGLE_CLOUD_PROJECTexits 1 naming the env key plus the ADC hint.HOME: no API-key step, required project step (rejects empty/whitespace input), optional location step, the three Claude presets in the model menu, and correct~/.openwiki/.envcontents afterwards.gcloudADC on theglobalendpoint, withclaude-haiku-4-5@20251001responding through the deepagents tool-calling path.README and the repo's
openwiki/docs are updated to match (same file set as the openai-compatible provider PR, d75a9f3).🤖 Generated with Claude Code