Add Google Vertex AI provider for Anthropic Claude models#2824
Add Google Vertex AI provider for Anthropic Claude models#2824harche wants to merge 1 commit intoopenshift:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Local integration test with Vertex AITested locally against Google Vertex AI using Application Default Credentials:
|
|
@xrajesh ptal |
Adds a new `google_vertex` LLM provider type that enables using Anthropic Claude models through Google Cloud's Vertex AI. Uses `langchain-anthropic` with a custom `ChatAnthropicVertexAI` subclass that routes auth through Google ADC via the `anthropic` SDK's `AnthropicVertex` client. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e39f1b0 to
6e041d4
Compare
|
Note on I intentionally used
The workaround is a thin |
|
Gemini on Vertex AI — blocked by I looked into adding Gemini support over Vertex AI as well, but every Google SDK that supports Vertex (
|
|
thank you @harche . |
|
@harche: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
google_vertexLLM provider type that enables using Anthropic Claude models (e.g.claude-opus-4-6) through Google Cloud's Vertex AIlangchain-anthropicwith a customChatAnthropicVertexAIsubclass that routes authentication through Google ADC via theanthropicSDK'sAnthropicVertexclientlangchain-google-vertexaidue to an unresolvablehttpxversion conflict with the existingibm-generative-aidependencyChanges
ols/constants.py— AddedPROVIDER_GOOGLE_VERTEXconstantols/src/llms/providers/google_vertex.py— New provider implementationols/src/llms/providers/provider.py— Added parameter definitions and mappingsols/app/models/config.py— AddedGoogleVertexConfigmodel and wired intoProviderConfigpyproject.toml/uv.lock— Addedlangchain-anthropic>=0.3.12dependencytests/unit/llms/providers/test_google_vertex.py— Unit tests (3 tests)tests/unit/llms/providers/test_providers.py— Added to registration testdocs/ai/providers.md— Updated provider reference tableexamples/olsconfig.yaml— Added example configurationTest plan
pytest tests/unit/llms/— 78 tests)pytest tests/unit/app/models/test_config.py— 155 tests)🤖 Generated with Claude Code