feat(providers): add Google Vertex AI provider for Claude - #3569
Open
eilonc-pillar wants to merge 1 commit into
Open
feat(providers): add Google Vertex AI provider for Claude#3569eilonc-pillar wants to merge 1 commit into
eilonc-pillar wants to merge 1 commit into
Conversation
Author
|
Hi all - @leon @intertwine @timknip @rewbs Very good job on the Hermes agent! It delivers a lot of value and innovation. Best, |
|
Would like this feature to be merged, would work great. |
eilonc-pillar
force-pushed
the
feat/vertex-ai-provider
branch
from
April 11, 2026 17:37
7b735b2 to
20ec877
Compare
Add vertex-ai as a first-class provider using AnthropicVertex SDK with GCP Application Default Credentials. Supports main agent, auxiliary, compression, delegation, and credential pool routing. - anthropic_adapter: build_vertex_client() and resolve_vertex_credentials() - auxiliary_client: _try_vertex(), forced provider, and resolve_provider_client - runtime_provider: vertex-ai resolution + credential pool api_mode fix - auth: vertex-ai ProviderConfig entry - run_agent: vertex-ai client initialization and api_mode detection - pyproject.toml: vertex optional extra (anthropic[vertex]) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eilonc-pillar
force-pushed
the
feat/vertex-ai-provider
branch
from
April 11, 2026 17:40
20ec877 to
4c49036
Compare
10 tasks
8 tasks
23 tasks
3 tasks
6 tasks
Contributor
|
Thanks for the Claude-on-Vertex contribution. The requested behavior is not present on current main, but this April implementation predates the current Vertex provider and needs a targeted salvage rather than a direct application. Problems
Suggested changes
Automated hermes-sweeper review. |
EgorLu
added a commit
to EgorLu/hermes-agent
that referenced
this pull request
Jul 29, 2026
Add native support for running Claude models on Google Vertex AI using
Anthropic's AnthropicVertex SDK adapter. The provider is named 'vertex'
(following the Bedrock pattern) with model-based routing: Claude models
use the AnthropicVertex SDK for full feature parity (prompt caching,
thinking budgets), while non-Claude models raise a clear error noting
that Gemini/other model support is planned.
Configuration uses Google Application Default Credentials (ADC):
export ANTHROPIC_VERTEX_PROJECT_ID=your-gcp-project
export CLOUD_ML_REGION=global # optional, defaults to 'global'
gcloud auth application-default login
Provider registration:
- plugins/model-providers/vertex/ — ProviderProfile with gcp_adc auth
- hermes_cli/auth.py — ProviderConfig, auth status, credential resolver
- hermes_cli/runtime_provider.py — model-based routing with
_is_anthropic_vertex_model() (mirrors is_anthropic_bedrock_model)
- hermes_cli/models.py — ProviderEntry, aliases, static model catalog
- hermes_cli/main.py + model_setup_flows.py — 'hermes model' wizard
Runtime wiring:
- agent/anthropic_adapter.py — build_anthropic_vertex_client()
- agent/agent_init.py — Vertex client construction branch
- run_agent.py — _rebuild_anthropic_client Vertex dispatch
- agent/agent_runtime_helpers.py — runtime recovery + switch_model
- agent/chat_completion_helpers.py — fallback activation
- agent/auxiliary_client.py — vision backend + auxiliary resolution
Dependencies:
- pyproject.toml — anthropic-vertex optional extra
- tools/lazy_deps.py — lazy install entry
Tests: 7 new tests covering adapter, runtime resolution, client init.
Docs: vertex-ai.md guide + providers table entry.
Aliases: google-vertex, gcp-vertex, vertex-ai, vertex-anthropic.
Closes NousResearch#13484, closes NousResearch#12639.
Related: NousResearch#3569, NousResearch#6491 (prior attempts, smaller scope).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
vertex-aias a first-class provider, enabling Claude models via Google Cloud Vertex AI with Application Default Credentials (ADC).AnthropicVertexfromanthropic[vertex]SDKConfiguration
Changes
agent/anthropic_adapter.pybuild_vertex_client()+resolve_vertex_credentials()agent/auxiliary_client.py_try_vertex(), auto-resolver guard,resolve_provider_clientrouting, aux model entryhermes_cli/auth.pyhermes_cli/runtime_provider.pyapi_modefixrun_agent.pypyproject.tomlvertexoptional extraWhat changed since v1
hermes_cli/runtime_provider.py— vertex-ai resolution was missing, causing the credential pool to fall back tochat_completionsand create an OpenAI client instead ofAnthropicVertexapi_modefix in_resolve_runtime_from_pool_entry()auxiliary_client.pyconflict from upstream's_resolve_forced_providerremoval)Tested
Locally and on GCP with a Vertex AI service account using ADC.
Install
pip install 'hermes-agent[vertex]'