openclaw - 💡(How to fix) Fix google-vertex provider: gcloud ADC authentication not working (401 or timeout)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • \openclaw models list --provider google-vertex\ shows: \google-vertex/gemini-2.5-flash text 195k no yes configured
    → Auth shows \yes configured, meaning the provider recognizes ADC
  • But actual inference calls fail with 401 UNAUTHENTICATED: \Google Vertex AI API error (401): API keys are not supported by this API. Expected OAuth2 access token...\
  • Without proxy: ETIMEDOUT (network issue, likely DNS pollution)
  • With proxy: 401 error

Root Cause

The 401 error suggests OpenClaw's google-vertex implementation may not be using the gcloud ADC token correctly. The error message \Expected OAuth2 access token\ implies Vertex AI expects a specific token format from google-auth library, but OpenClaw may be passing the raw access token incorrectly.

Alternatively, the Gateway service (runs as Scheduled Task under user account on Windows) may not properly inherit the user environment variables or gcloud credential file path.

RAW_BUFFERClick to expand / collapse

Problem

google-vertex provider does not work with gcloud Application Default Credentials (ADC) on Windows. Calls to google-vertex/gemini-2.5-flash fail with either 401 UNAUTHENTICATED or ETIMEDOUT errors.

Environment

  • OS: Windows
  • OpenClaw: 2026.5.16-beta.7
  • Node.js: v24.14.0
  • gcloud CLI: installed and authenticated

What was done

  1. Installed Google Cloud CLI
  2. Ran \gcloud auth login\ (user login)
  3. Ran \gcloud auth application-default login\ (ADC setup)
  4. Ran \gcloud auth application-default set-quota-project <project-id>\
  5. Set environment variables:
    • \GOOGLE_CLOUD_PROJECT=<project-id>\
    • \GOOGLE_CLOUD_LOCATION=us-central1\
    • \GOOGLE_APPLICATION_CREDENTIALS\ (default: ~/.config/gcloud/application_default_credentials.json)
  6. Verified ADC works: \gcloud auth application-default print-access-token\ returns a valid token

Observed behavior

  • \openclaw models list --provider google-vertex\ shows: \google-vertex/gemini-2.5-flash text 195k no yes configured
    → Auth shows \yes configured, meaning the provider recognizes ADC
  • But actual inference calls fail with 401 UNAUTHENTICATED: \Google Vertex AI API error (401): API keys are not supported by this API. Expected OAuth2 access token...\
  • Without proxy: ETIMEDOUT (network issue, likely DNS pollution)
  • With proxy: 401 error

Root cause analysis

The 401 error suggests OpenClaw's google-vertex implementation may not be using the gcloud ADC token correctly. The error message \Expected OAuth2 access token\ implies Vertex AI expects a specific token format from google-auth library, but OpenClaw may be passing the raw access token incorrectly.

Alternatively, the Gateway service (runs as Scheduled Task under user account on Windows) may not properly inherit the user environment variables or gcloud credential file path.

Expected behavior

google-vertex provider should work with gcloud ADC on Windows, similar to how it works on Linux (where users set environment variables in systemd service).

Changelog check

Reviewed v2026.5.16-beta.7 and v2026.5.18-beta.1 changelogs - no fixes related to google-vertex ADC or gcloud ADC authentication.

Tags

provider google-vertex gcloud ADC authentication windows

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

google-vertex provider should work with gcloud ADC on Windows, similar to how it works on Linux (where users set environment variables in systemd service).

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix google-vertex provider: gcloud ADC authentication not working (401 or timeout)