feat(ai): add google vertex ai platform support for google ai provider#7769
feat(ai): add google vertex ai platform support for google ai provider#7769claude[bot] wants to merge 2 commits intomainfrom
Conversation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Deploying windmill with
|
| Latest commit: |
6518ed1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://7e3fda89.windmill.pages.dev |
| Branch Preview URL: | https://claude-issue-7768-20260203-1.windmill.pages.dev |
|
/ai there should not be a google_platform in AIResource, platform should be either anthropicplatform or googleplatform. also it seems there is useless duplicate code, clean the code |
|
Claude finished @centdix's task in 3m 49s —— View job Refactoring Google Vertex AI Platform Support
Summary: Refactored the Google Vertex AI platform support to remove duplicate code and use a unified platform enum. Changes made:
Result: Reduced code by 29 lines while maintaining full functionality. Resources can now be configured with a single |
- Merge AnthropicPlatform and GoogleAIPlatform into a single AIPlatform enum - Remove duplicate google_platform field from AIStandardResource, AIRequestConfig, and ProviderResource - Both Anthropic and Google AI providers now use the same platform field to indicate Vertex AI usage - Simplify ProviderWithResource to have a single get_platform() method This reduces code duplication and makes the resource configuration cleaner - the same platform field works for both providers since both support the same values (standard and google_vertex_ai). Co-authored-by: centdix <centdix@users.noreply.github.com>
Summary
Adds support for Google Vertex AI platform to the Google AI provider, similar to how Anthropic already supports Vertex AI through a
platformfield on resources.This allows users to use Google's Gemini models through Vertex AI instead of the standard Google AI endpoint, enabling enterprise customers to use their GCP infrastructure for AI requests.
Closes #7768
Changes
GoogleAIPlatformenum withStandardandGoogleVertexAivariants (in bothwindmill-apiandwindmill-worker)google_platformfield toProviderResourceandAIRequestConfigstructsGoogleAIQueryBuilderto accept and handle the platform parameter/models/prefix)gcloud auth print-access-token) instead ofx-goog-api-keyTest plan
google_platform: "google_vertex_ai"andbaseUrlpointing to Vertex AI endpoint (e.g.,https://{region}-aiplatform.googleapis.com/v1/projects/{project}/locations/{location}/publishers/google/models)apiKeyto a GCP OAuth2 access token (fromgcloud auth print-access-token)Generated with Claude Code