Google (Gemini & Vertex AI)
Gemini is available two ways: through Google AI (google, an API key) or through Vertex AI /
Agent Platform (google-vertex, Application Default Credentials). Pick whichever matches how your
org buys Google models.
Google AI (Gemini API key)
Section titled “Google AI (Gemini API key)”The quickest path: a single API key.
- Create a key in Google AI Studio.
- Store it as
GEMINI_API_KEY.
model: google/gemini-2.5-proproviders: allowlist: [google]- uses: louisescher/crabd@v0 with: model: google/gemini-2.5-pro env: GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}Vertex AI / Agent Platform
Section titled “Vertex AI / Agent Platform”Use google-vertex when you want Gemini billed and governed through Google Cloud. It authenticates
with Application Default Credentials, a service-account key the runner can read.
- Set up Workload Identity Federation for the repository, so the runner gets a short-lived token and there’s no key to leak.
- Provide the ADC file path and your project/location via env.
model: google-vertex/gemini-2.5-proproviders: allowlist: [google-vertex]- uses: google-github-actions/auth@v2 id: auth with: workload_identity_provider: projects/123/locations/global/workloadIdentityPools/gh/providers/gh service_account: crabd@my-gcp-project.iam.gserviceaccount.com- uses: louisescher/crabd@v0 with: model: google-vertex/gemini-2.5-pro env: GOOGLE_APPLICATION_CREDENTIALS: ${{ steps.auth.outputs.credentials_file_path }} GOOGLE_CLOUD_PROJECT: my-gcp-project GOOGLE_CLOUD_LOCATION: us-central1