#how do i use google vertex for openclaw

1 messages · Page 1 of 1 (latest)

tulip bloomBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

safe lintel
#

@signal frost

#

pls help @signal frost

signal frostBOT
#

OpenClaw does support Vertex AI — the provider name you want is google-vertex (it’s built-in, so you don’t add a custom entry under models.providers).

What usually trips people up is that Vertex needs (1) ADC creds + (2) project + location.

1) Auth: Google ADC (Application Default Credentials)

Vertex uses Google’s standard ADC chain (not a GEMINI_API_KEY).

Common options:

  • Local/dev: gcloud auth application-default login
  • Server: set GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json (and make sure that file is readable by the user running the OpenClaw Gateway)

Also make sure the Vertex AI API is enabled in that GCP project and the principal has permissions to call Vertex.

2) Required env vars: project + location

google-vertex requires:

  • GOOGLE_CLOUD_PROJECT (or GCLOUD_PROJECT)
  • GOOGLE_CLOUD_LOCATION
signal frostBOT
# safe lintel <@1457407575476801641>

You don’t need to ping me here (and I can’t reply with pings anyway) — just drop the details and I’ll help.

OpenClaw supports Vertex as the built-in provider google-vertex. The two things you must have are:

1) Google ADC credentials (NOT an API key)

Vertex uses Google Application Default Credentials.

Pick one:

A. Local/dev (easiest)

gcloud auth application-default login

B. Server/service account

  • Create a service account JSON key
  • On the machine running the OpenClaw Gateway:
signal frostBOT
# safe lintel pls help <@1457407575476801641>

I can help — but I need to see what part is failing (auth vs project/location vs model ref).

Do this on the machine running the OpenClaw Gateway

1) Make sure Vertex auth (ADC) exists

gcloud auth application-default login

(or use a service account JSON via GOOGLE_APPLICATION_CREDENTIALS)

2) Set required env vars (Vertex needs these)

  • GOOGLE_CLOUD_PROJECT (or GCLOUD_PROJECT)
  • GOOGLE_CLOUD_LOCATION (example: us-central1)

If you’re running the Gateway as a daemon/service, don’t rely on your shell env—put them in openclaw.json instead:

{
#

If these aren’t set, Vertex will fail with an error like “Vertex AI requires a project ID…” / “requires a location…”.

You can put them in your OpenClaw config too, e.g.:

{
  env: {
    GOOGLE_CLOUD_PROJECT: "your-project-id",
    GOOGLE_CLOUD_LOCATION: "us-central1"
  }
}

3) Pick a model from the catalog and set it

On the gateway host, run:

#
  export GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"

Also ensure Vertex AI API is enabled in that GCP project and the identity has permission to call it.

2) Set project + location

Vertex requires these env vars (otherwise it errors):

  • GOOGLE_CLOUD_PROJECT (or GCLOUD_PROJECT)
  • GOOGLE_CLOUD_LOCATION

Example (shell):

export GOOGLE_CLOUD_PROJECT="your-project-id"
export GOOGLE_CLOUD_LOCATION="us-central1"
#
  env: {
    GOOGLE_CLOUD_PROJECT: "your-project-id",
    GOOGLE_CLOUD_LOCATION: "us-central1",
  },
}

Then restart the gateway.

3) Pick a Vertex model from OpenClaw’s list

openclaw models list --all --provider google-vertex
openclaw models set google-vertex/<model-id-from-the-list>
openclaw models status

Paste these 3 outputs here

#
openclaw models list --all --provider google-vertex
openclaw models set google-vertex/<model-id-from-the-list>
openclaw models status

Docs (relevant section): https://docs.openclaw.ai/concepts/model-providers


If you paste these three outputs, I can tell you exactly what’s missing:

openclaw --version
openclaw models status
openclaw models list --all --provider google-vertex
#

Or in openclaw.json:

{
  env: {
    GOOGLE_CLOUD_PROJECT: "your-project-id",
    GOOGLE_CLOUD_LOCATION: "us-central1",
  },
}

After changing env vars/config, restart the gateway.

3) Select a model via the CLI (don’t hand-type guesses)

openclaw models list --all --provider google-vertex
openclaw models set google-vertex/<pick-from-that-list>
#
openclaw --version
openclaw models status
openclaw models list --all --provider google-vertex

(If there’s an error when you try to set/use the model, paste that exact error too.)