Google Vertex AI
Avant exchanges the workspace’s assertion through Workload Identity Federation in your project, impersonates a service account there, and calls Vertex AI (Gemini Enterprise Agent Platform). Usage is billed to your GCP project. Read How provider setup works first.
What you create
Section titled “What you create”- A service account with
roles/aiplatform.user. - A Workload Identity pool and OIDC provider that trust
https://identity.avant.codes. Create these once and reuse them. - A
roles/iam.workloadIdentityUsergrant on the service account for the workspace’s exact subject. Add one per workspace.
Commands
Section titled “Commands”PROJECT_ID="<your-project>"SA_ID="avant-byoc"SA_EMAIL="${SA_ID}@${PROJECT_ID}.iam.gserviceaccount.com"
gcloud services enable aiplatform.googleapis.com iam.googleapis.com \ sts.googleapis.com iamcredentials.googleapis.com --project "$PROJECT_ID"
gcloud iam service-accounts create "$SA_ID" --project "$PROJECT_ID" \ --display-name "Avant BYOC inference"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \ --member "serviceAccount:${SA_EMAIL}" --role roles/aiplatform.user
gcloud iam workload-identity-pools create avant-byoc \ --project "$PROJECT_ID" --location global --display-name "Avant BYOC"
gcloud iam workload-identity-pools providers create-oidc avant-oidc \ --project "$PROJECT_ID" --location global --workload-identity-pool avant-byoc \ --issuer-uri https://identity.avant.codes \ --attribute-mapping "google.subject=assertion.sub"
gcloud iam workload-identity-pools providers describe avant-oidc \ --project "$PROJECT_ID" --location global --workload-identity-pool avant-byoc \ --format='value(name)'The last command prints the Workload Identity Provider resource:
projects/<number>/locations/global/workloadIdentityPools/avant-byoc/providers/avant-oidc.
Then grant the workspace’s subject:
BINDING_SUBJECT="avant:binding:..."PROJECT_NUMBER="$(gcloud projects describe "$PROJECT_ID" --format='value(projectNumber)')"
gcloud iam service-accounts add-iam-policy-binding "$SA_EMAIL" --project "$PROJECT_ID" \ --member "principal://iam.googleapis.com/projects/${PROJECT_NUMBER}/locations/global/workloadIdentityPools/avant-byoc/subject/${BINDING_SUBJECT}" \ --role roles/iam.workloadIdentityUserThe dashboard’s create form shows these commands with your values filled in.
Create the workspace
Section titled “Create the workspace”| Field | Value |
|---|---|
| GCP project ID | $PROJECT_ID |
| Location | global, us, eu, or a single region such as us-east5 |
| Service account email | $SA_EMAIL |
| Workload Identity Provider resource | The output of describe above |
avant workspace create --name vertex --mode byoc-gcp \ --project-id "$PROJECT_ID" --location global --service-account "$SA_EMAIL" \ --workload-identity-provider projects/<number>/locations/global/workloadIdentityPools/avant-byoc/providers/avant-oidcavant workspace verify vertexVerify impersonates the service account and makes one read-only Vertex AI call.
Location
Section titled “Location”The location is where inference runs, and it decides which models you can reach. Some partner models are only offered in a single region, not at global, us or eu. To reach one, set that region as the location. To keep requests inside a region, also set Inference location in the policy.
Models
Section titled “Models”Claude models use the Messages API. Gemini, Grok and other partner models use Chat Completions. Codex isn’t supported, because Vertex AI’s OpenAI-compatible endpoint has no Responses API.
| Model | API | Locations | Harnesses |
|---|---|---|---|
gemini-3.7-flash | Chat Completions | global, us, eu | OpenCode, Pi, Oh My Pi |
gemini-3.8-flash | Chat Completions | global, us, eu | OpenCode, Pi, Oh My Pi |
gemini-4-argon | Chat Completions | global, us, eu | OpenCode, Pi, Oh My Pi |
gemini-4-carbon | Chat Completions | global, us, eu | OpenCode, Pi, Oh My Pi |
gemini-4-hydrogen | Chat Completions | global, us, eu | OpenCode, Pi, Oh My Pi |
gemini-4-neon (default) | Chat Completions | global, us, eu | OpenCode, Pi, Oh My Pi |
claude-sonnet-5 | Messages | global, us, eu | Claude Code, OpenCode, Pi, Oh My Pi |
claude-opus-5 | Messages | global, us, eu | Claude Code, OpenCode, Pi, Oh My Pi |
claude-opus-5-5 | Messages | global, us, eu | Claude Code, OpenCode, Pi, Oh My Pi |
claude-sonnet-5-5 | Messages | global, us, eu | Claude Code, OpenCode, Pi, Oh My Pi |
claude-haiku-5-5 | Messages | global, us, eu | Claude Code, OpenCode, Pi, Oh My Pi |
claude-fable-5 | Messages | global, us, eu | Claude Code, OpenCode, Pi, Oh My Pi |
claude-fable-5-1 | Messages | global, us, eu | Claude Code, OpenCode, Pi, Oh My Pi |
claude-fable-5-2 | Messages | global, us, eu | Claude Code, OpenCode, Pi, Oh My Pi |
grok-4.6 | Chat Completions | global | OpenCode, Pi, Oh My Pi |
grok-4.7 | Chat Completions | global | OpenCode, Pi, Oh My Pi |
You also need access to each partner model in your project’s Model Garden.
Revoke
Section titled “Revoke”Remove the roles/iam.workloadIdentityUser grant, or delete the service account.
There’s also an OpenTofu module in infra/customer-onboarding in the Avant repository that creates the same resources.