AI under your own BAA (Vertex)
Run the engine's AI on Claude in your own Google Vertex AI project, under the BAA you already hold with Google, with Workload Identity and no API key.
On this page
By default the engine's AI features call the Anthropic API with an API key. If your organization already has a Business Associate Agreement with Google that covers Vertex AI, you can run the same features on Claude in your own Vertex project instead. Prompts then go to your project, in the region you pick, under the BAA you already hold. You also control which models are enabled and who can call them.
sequenceDiagram
participant You
participant Engine as MedHook engine (GKE)
participant Vertex as Vertex AI (your project)
You->>Engine: Ask the agent, AI suggest, or describe a condition
Engine->>Engine: Mask identifiers in the prompt
Engine->>Vertex: Prompt, as the engine service account (Workload Identity)
Vertex-->>Engine: Answer
Engine->>Engine: Audit ai.model_call (provider, project, region, tokens)
Engine-->>You: Suggestion you review and saveBefore you start
- A Google Cloud project with Vertex AI, covered by your BAA with Google.
- Claude enabled in that project's Model Garden, in the region you want to use.
- The engine running on GKE with Workload Identity, as the GKE Terraform sets it up. See Install in your cloud.
- An engine admin, to check Settings → AI features & BAA afterwards.
Turn it on with Terraform
Set three variables in your GKE Terraform and apply:
engine_ai_provider = "vertex"
engine_ai_vertex_project = "" # empty uses project_id
engine_ai_vertex_region = "us-east5" # empty uses regionTerraform enables the Vertex AI API on that project and gives the engine service account roles/aiplatform.user there. The engine pod already runs as that service account through Workload Identity, so there is no key file and no API key. The region is pinned: Terraform, the Helm chart and the engine itself refuse the global endpoint and the us and eu multi-regions, so prompts are processed only in the region you chose.
Choosing Vertex does not turn AI on. Set engine_ai_features_enabled = true too, once you are ready.
Turn it on with Helm
Without Terraform, set the chart values and grant the role yourself:
engine:
aiFeaturesEnabled: true
aiProvider: vertex
aiVertexProject: your-vertex-project
aiVertexRegion: us-east5The chart refuses to render with aiProvider: vertex and no project or region, or with global, us or eu as the region. Give the Google service account the engine's Kubernetes service account maps to roles/aiplatform.user on the Vertex project. You can leave global.anthropicApiKey empty.
Check it
Open Settings → AI features & BAA. The Provider block shows:
| Row | Value |
|---|---|
| AI provider | Google Vertex (Claude), no API key |
| AI project | the Vertex project |
| AI region | the pinned region |
If the provider shows Not configured, the note says which variable is missing. With AI features on, the engine also refuses to start when AI_PROVIDER=vertex has no project or region, and logs the reason.
Then ask the agent a question, and open the Audit log. Every model call writes an ai.model_call event with the provider, the Vertex project and region, the model, the token counts and whether it succeeded. It never holds the prompt or the answer.
What is sent
Only what a feature needs goes to the model, and identifiers are masked first.
| Feature | What the model sees |
|---|---|
| AI suggest in the Data Map | The sample message, de-identified, and field paths of mappings you accepted before |
| Conditions | Your description, with quoted values swapped for placeholders, and the field paths |
| Workflow from a description | Your description, masked, and adapter types |
| Agent | Your message, masked, and workflow structure: never code, tables or descriptions |
| Assistant | Your messages, masked, and what its read-only tools read from the engine API as you |
The engine masks names, MRNs, dates of birth, phone numbers, emails, addresses and long ID numbers before a prompt leaves. Live messages never go to a model: after you save a mapping or condition it is plain configuration. Masking is a safeguard, not a substitute for the BAA, so ask people never to type patient details into a prompt.
Turn AI off
Set engine_ai_features_enabled = false in Terraform, or engine.aiFeaturesEnabled: false in Helm (AI_FEATURES_ENABLED=false), and roll out. Every AI route then answers 403 and the UI hides its AI entry points. In production, AI is off unless you set it to true. To stop calls at the Google side as well, remove roles/aiplatform.user from the engine service account.
Reference
AI_PROVIDER:anthropic(default) orvertex.AI_VERTEX_PROJECT: the Google Cloud project whose Vertex AI runs Claude.AI_VERTEX_REGION: the Vertex region, for exampleus-east5. The engine refusesglobal,usandeu.- Environment variables
- Security
- AI-assisted mapping and conditions