feat(providers): add Google Vertex AI provider for Claude#3569
Open
eilonc-pillar wants to merge 2 commits intoNousResearch:mainfrom
Open
feat(providers): add Google Vertex AI provider for Claude#3569eilonc-pillar wants to merge 2 commits intoNousResearch:mainfrom
eilonc-pillar wants to merge 2 commits intoNousResearch:mainfrom
Conversation
Enables Claude models via Google Cloud Vertex AI with Application Default Credentials (ADC). Uses the official AnthropicVertex client from the anthropic[vertex] SDK, reusing 100% of the existing Anthropic adapter (message conversion, tool handling, streaming). Configuration: provider: vertex-ai model: claude-opus-4-6 Environment: VERTEX_PROJECT=my-gcp-project (required) VERTEX_REGION=us-east5 (optional, default: us-east5) Authentication: - Attached service account on GCP VMs (ADC) - GOOGLE_APPLICATION_CREDENTIALS key file - gcloud auth application-default login (local dev) No new adapters needed — Vertex AI Claude speaks the same Messages API. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Author
|
Hi all - @leon @intertwine @timknip @rewbs Very good job on the Hermes agent! It delivers a lot of value and innovation. Best, |
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-chain guard + aux model entryhermes_cli/auth.pyrun_agent.pypyproject.tomlvertexoptional extraTested
Design Decisions
AnthropicVertexspeaks the same Messages API asAnthropic. Settingapi_mode = "anthropic_messages"reuses all existing message conversion, tool handling, and streaming code._resolve_api_key_provider()has an explicitvertex-aiguard to prevent the generic OpenAI client path from mishandling GCP project IDs.VERTEX_PROJECT,GOOGLE_CLOUD_PROJECT, andGCP_PROJECT_IDin order.Install
pip install 'hermes-agent[vertex]'