Skip to content

[Bug]: [Bug]: google-vertex models fail with model_not_found at runtime on 2026.5.28 and 2026.6.1 — direct Vertex API calls succeed with same credentials #90506

Closed

Description

@paulogogs

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After upgrading from 2026.5.26 to 2026.5.28 (confirmed still broken on 2026.6.1), all google-vertex/* models fail at runtime with model_not_found, while direct Vertex AI REST calls using the exact same authorized_user ADC credentials succeed. Model appears correctly in openclaw models list and gateway startup logs — failure only occurs when a request is made.

Steps to reproduce

  1. Configure openclaw.json with google-vertex/gemini-3-flash-preview as primary and google-vertex/gemini-2.5-flash as fallback
  2. Set GOOGLE_APPLICATION_CREDENTIALS=/path/to/vertex-key.json (authorized_user type), GOOGLE_CLOUD_PROJECT, GOOGLE_CLOUD_LOCATION=global in systemd drop-in env.conf
  3. Ensure plugins.entries.google.enabled = true
  4. Run on OpenClaw 2026.5.26 — works correctly
  5. Upgrade to 2026.5.28 or 2026.6.1 without any config changes
  6. Send any message to an agent
  7. Observe FallbackSummaryError: All models failed — model_not_found for both primary and fallback

Expected behavior

google-vertex/gemini-3-flash-preview responds normally, as observed on 2026.5.26 with identical config and credentials. Direct Vertex AI REST calls with the same authorized_user credentials succeed on both broken versions, confirming the credentials and model are valid.

Actual behavior

FallbackSummaryError: All models failed (2): google-vertex/gemini-3-flash-preview: Unknown model: google-vertex/gemini-3-flash-preview (model_not_found) | google-vertex/gemini-2.5-flash: Unknown model: google-vertex/gemini-2.5-flash (model_not_found)

Gateway log: [model-fallback/decision] decision=candidate_failed reason=model_not_found
Auth state shows no google-vertex entry. openclaw models auth login --provider google-vertex returns "No provider plugins found" despite google plugin being enabled and loaded.

OpenClaw version

2026.5.28 (first broken) | 2026.6.1 (2e08f0f) also broken | 2026.5.26 (10ad3aa) last known good

Operating system

Ubuntu 24.04

Install method

No response

Model

npm global

Provider / routing chain

openclaw -> google-vertex (ADC/authorized_user) -> Vertex AI global endpoint

Additional provider/model setup details

  • Credential type: authorized_user (gcloud auth application-default login), NOT service account
  • GOOGLE_APPLICATION_CREDENTIALS=/root/vertex-key.json
  • GOOGLE_CLOUD_PROJECT=project-4d1b0250-40a7-450a-a1f
  • GOOGLE_CLOUD_LOCATION=global
  • plugins.entries.google.enabled = true
  • No google-vertex entry in auth-profiles.json (Vertex works via ADC env vars, not auth profiles)
  • openclaw models auth login --provider google-vertex returns "No provider plugins found"
  • openclaw models list correctly shows google-vertex models with Auth: yes
  • Gateway startup log confirms: [gateway] agent model: google-vertex/gemini-3-flash-preview

Logs, screenshots, and evidence

# Gateway log (runtime failure):
[diagnostic] lane task error: error="FailoverError: Unknown model: google-vertex/gemini-3-flash-preview"
[model-fallback/decision] decision=candidate_failed reason=model_not_found next=google-vertex/gemini-2.5-flash
[model-fallback/decision] decision=candidate_failed reason=model_not_found next=none

# Direct Vertex API call with same credentials (succeeds on both broken versions):
python3 -c "
import google.auth, google.auth.transport.requests, urllib.request, json
creds, project = google.auth.default()
creds.refresh(google.auth.transport.requests.Request())
url = f'https://aiplatform.googleapis.com/v1/projects/{project}/locations/global/publishers/google/models/gemini-3-flash-preview:generateContent'
# Returns HTTP 200 — model and credentials valid
"

# Related issues: #65715 (anthropic-vertex ADC env spread copy), #56253 (google-vertex ADC ignored)

Impact and severity

Affected: Any user running google-vertex/* models with authorized_user ADC credentials (gcloud auth application-default login) on Linux, via systemd gateway
Severity: High — blocks all agent requests, forces downgrade or expensive fallback to paid Anthropic API
Frequency: Always — 100% reproducible, every request fails on affected versions
Consequence: All agents go offline on google-vertex primary + fallback; forced fallback to Anthropic claude-sonnet-4-6 incurs unexpected API costs

Additional information

Last known good: 2026.5.26 (10ad3aa)
First known bad: 2026.5.28
Also broken on: 2026.6.1 (2e08f0f) — 2026.6.1 release notes mention "Google/Vertex catalog fixes" (#88480, #88512, #88851, #88860) but did not fix this specific case.
Temporary workaround: downgrade to 2026.5.26 — zero config changes needed, Vertex works immediately.
Hypothesis: similar root cause to #65715 (anthropic-vertex ADC detection fails when env is spread copy of process.env). The google-vertex provider's catalog resolution may share the same env !== process.env identity check that prevents ADC credential discovery at runtime.
Note: authorized_user credentials (not service account) may be a distinct code path not covered by existing fixes.

Activity

  1. clawsweeper commented on Jun 5, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 4, 2026, 10:03 PM ET / 02:03 UTC.

    Summary
    Keep open: this still looks actionable on current main because Google Vertex ADC auth evidence resolves to a non-secret marker for runtime auth, but the models.json generation path only fills missing provider apiKey values from env-var names or profiles, so ADC-backed static catalog rows can still be dropped before embedded runtime model resolution.

    Reproducibility: yes. source-level reproduction is high confidence: set ADC auth evidence without a google-vertex auth profile and the current models.json writer has no path to fill the static catalog provider apiKey with gcp-vertex-credentials. A live Vertex turn was not run in this read-only review.

    Next step
    This is a narrow provider auth/config generation regression with clear likely files and focused tests, so it is suitable for a maintainer-promoted fix PR.

    Review details

    Best possible solution:

    Propagate resolved Google Vertex ADC auth evidence into generated provider config as gcp-vertex-credentials, then prove embedded runtime resolves google-vertex/* catalog models and the transport uses ADC bearer auth without requiring a manual auth profile or custom models.providers entry.

    Do we have a high-confidence way to reproduce the issue?

    Yes, source-level reproduction is high confidence: set ADC auth evidence without a google-vertex auth profile and the current models.json writer has no path to fill the static catalog provider apiKey with gcp-vertex-credentials. A live Vertex turn was not run in this read-only review.

    Is this the best way to solve the issue?

    Yes, the best fix is to repair the existing auth-evidence-to-model-config path so ADC-backed Google Vertex providers stay registered. Adding a new config option or telling users to manually add models.providers.google-vertex.models[] would be a workaround, not the right product fix.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • I did not run a live Vertex ADC request or mutate the checkout; the source path is strong, but the packaged gateway repro should still be proven with a focused test or live redacted ADC setup.
    • A fix should preserve the existing guard that unauthenticated static catalog providers are not written; only verified non-secret auth evidence markers such as gcp-vertex-credentials should satisfy the writable-provider check.

    Codex review notes: model gpt-5.5, reasoning high; reviewed against 6868cde4d45f.

    Label changes

    Label changes:

    • add P1: The report is a recent regression that blocks all agent turns for users whose primary and fallback models are Google Vertex ADC-backed models.
    • add impact:message-loss: Affected users can send messages but the agent fails before producing a usable model response when every Google Vertex candidate resolves as missing.
    • add impact:auth-provider: The failure is in Google Vertex provider auth/model availability, where ADC credentials are recognized in one path but not preserved into model config generation.
    • add issue-rating: 🦞 diamond lobster: Current issue advisory state selects this label.
    • add clawsweeper:source-repro: Current issue advisory state selects this label.
    • add clawsweeper:queueable-fix: Current issue advisory state selects this label.
    • add clawsweeper:fix-shape-clear: Current issue advisory state selects this label.

    Label justifications:

    • P1: The report is a recent regression that blocks all agent turns for users whose primary and fallback models are Google Vertex ADC-backed models.
    • impact:auth-provider: The failure is in Google Vertex provider auth/model availability, where ADC credentials are recognized in one path but not preserved into model config generation.
    • impact:message-loss: Affected users can send messages but the agent fails before producing a usable model response when every Google Vertex candidate resolves as missing.
    Evidence reviewed

    Acceptance criteria:

    • node scripts/run-vitest.mjs src/agents/models-config.applies-config-env-vars.test.ts src/agents/embedded-agent-runner/model.test.ts extensions/google/transport-stream.test.ts
    • node scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.test.src.json --incremental --tsBuildInfoFile /tmp/openclaw-google-vertex-adc-test-src.tsbuildinfo
    • git diff --check

    What I checked:

    • Reported shipped regression: The issue reports last-known-good 2026.5.26, first-bad 2026.5.28, still-bad v2026.6.1, with google-vertex/gemini-3-flash-preview and google-vertex/gemini-2.5-flash failing as model_not_found while direct Vertex REST calls with the same authorized_user ADC credentials return HTTP 200.
    • Google plugin declares ADC auth evidence: The Google plugin manifest defines google-vertex setup auth evidence from GOOGLE_APPLICATION_CREDENTIALS plus project/location env, producing the non-secret gcp-vertex-credentials marker. (extensions/google/openclaw.plugin.json:590, 6868cde4d45f)
    • ADC evidence resolves to an auth marker: resolveEnvApiKey returns entry.credentialMarker when local-file auth evidence and required env are present, so ADC can be recognized as provider auth without a stored auth profile. (src/agents/model-auth-env.ts:75, 6868cde4d45f)
    • Runtime auth discovery accepts evidence markers: Agent auth discovery iterates both env candidates and auth evidence keys, then stores the resolved marker as an in-memory api_key credential for model discovery/runtime auth visibility. (src/agents/agent-auth-discovery-core.ts:18, 6868cde4d45f)
    • models.json generation misses ADC-only markers: When filling a provider with models but no apiKey, resolveMissingProviderApiKey uses resolveEnvApiKeyVarName, which only returns env-var-name sources, then falls back to auth profiles; ADC auth evidence sources do not become gcp-vertex-credentials here. (src/agents/models-config.providers.secret-helpers.ts:336, 6868cde4d45f)
    • Unauthenticated catalog providers are filtered: The models.json planner filters providers with model rows unless they have both baseUrl and apiKey, so a static google-vertex catalog lacking an ADC marker can be excluded from generated provider models. (src/agents/models-config.plan.ts:160, 6868cde4d45f)

    Likely related people:

    • Shakker: Current blame in this checkout points to Shakker on the central Google Vertex catalog/auth and embedded-runner model-resolution paths, though the checkout history is shallow/grafted. (role: recent area contributor; confidence: medium; commits: 79b6dd049e4e; files: src/agents/models-config.providers.secret-helpers.ts, src/plugins/provider-discovery.ts, extensions/google/openclaw.plugin.json)
    • 1052326311: Auth/provider routing context includes the merged Google provider transport fix in fix: resolve google provider default API to google-generative-ai #88512, which touched the same Google provider routing area but did not cover ADC catalog-marker propagation. (role: recent adjacent contributor; confidence: medium; commits: b73e135f9730, 5a15bd1c7974; files: extensions/google/api.test.ts, extensions/google/api.ts, src/agents/embedded-agent-runner/model.test.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    on Jun 5, 2026
  3. self-assigned this
    on Jun 5, 2026
  4. locked as resolved and limited conversation to collaborators on Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions