Our organization is a public institution and cannot establish a direct contract with Anthropic to obtain an API key. However, we already have an active Google Cloud Platform contract and a Service Account with access to Vertex AI.
We are trying to use Bitbucket Agentic Pipelines with provider: claude, routing all Claude Code calls to Vertex AI instead of the Anthropic API directly. The approach is to set the following environment variables via config.overrides.env in the agent definition:
CLAUDE_CODE_USE_VERTEX: "1" — to redirect Claude Code to Vertex AIANTHROPIC_VERTEX_PROJECT_ID — pointing to our GCP projectCLOUD_ML_REGION — set to us-east5GOOGLE_APPLICATION_CREDENTIALS — pointing to a temporary file written from a secured repository variable containing our Service Account JSON keyThe Atlassian support team confirmed that these variables set in config.overrides.env should route calls to Vertex AI and are not blocked by Bitbucket's security filters.
Questions:
Any experience or guidance would be greatly appreciated. Thanks!