openclaw - 💡(How to fix) Fix [Bug]: google-vertex/gemini-3.1-pro-preview returns empty assistant reply in 2026.4.5 [1 participants]

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…
GitHub stats
openclaw/openclaw#62027Fetched 2026-04-08 03:10:08
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
closed ×1

google-vertex/gemini-3.1-pro-preview returns an empty assistant reply in OpenClaw 2026.4.5, even though the model works in Vertex Playground and google-vertex/gemini-3-flash-preview works in the same OpenClaw environment.

Error Message

The session completes without a visible provider error, but the assistant reply is empty.

  • no fallback and no obvious logged provider error
  • instead of throwing an error,

Root Cause

  • request goes to provider google-vertex
  • model is gemini-3.1-pro-preview
  • assistant response is saved as empty text
  • output tokens are 0
  • stop reason is stop
  • no fallback and no obvious logged provider error
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Summary

google-vertex/gemini-3.1-pro-preview returns an empty assistant reply in OpenClaw 2026.4.5, even though the model works in Vertex Playground and google-vertex/gemini-3-flash-preview works in the same OpenClaw environment.

Model

google-vertex/gemini-3.1-pro-preview

Provider / routing chain

openclaw -> google-vertex -> Vertex AI

Additional provider/model setup details

  • Built-in google-vertex provider
  • Vertex authentication is valid and requests do reach Vertex AI
  • Tested with Vertex region us-central1
  • Same OpenClaw install can successfully use google-vertex/gemini-3-flash-preview
  • Vertex Playground can successfully use Gemini 3.1 Pro in the same general environment
  • No private credentials, project IDs, tokens, or local secret values are included here

Steps to reproduce

  1. Configure OpenClaw to use the built-in google-vertex provider
  2. Set the model to google-vertex/gemini-3.1-pro-preview
  3. Ensure Vertex authentication is valid
  4. Send a normal chat message such as hello???
  5. Observe that the request reaches Vertex AI, but the assistant reply is empty

Expected behavior

The assistant should return normal text output, similar to:

  • Vertex Playground using Gemini 3.1 Pro
  • google-vertex/gemini-3-flash-preview in the same OpenClaw install

Actual behavior

The session completes without a visible provider error, but the assistant reply is empty.

Observed session result:

  • provider: google-vertex
  • model: gemini-3.1-pro-preview
  • stopReason: stop
  • assistant text: ""
  • output tokens: 0

So this does not appear to be a crash or fallback. It looks like a successful completion with blank output.

OpenClaw version

2026.4.5

Operating system

Linux 6.1.0-38-amd64 x86_64 GNU/Linux

Install method

npm global install

Node.js version

v24.14.1

Logs, screenshots, and evidence

Relevant observed behavior from the session trace:

  • request goes to provider google-vertex
  • model is gemini-3.1-pro-preview
  • assistant response is saved as empty text
  • output tokens are 0
  • stop reason is stop
  • no fallback and no obvious logged provider error

Cross-check evidence:

  • google-vertex/gemini-3-flash-preview works in the same OpenClaw install
  • Gemini 3.1 Pro works in Vertex Playground
  • this suggests the request path and general Vertex setup are functional, but the OpenClaw runtime handling for this model is not returning usable text

Impact and severity

  • Affected users/systems/channels: users running OpenClaw with the built-in google-vertex provider and google-vertex/gemini-3.1-pro-preview
  • Severity: blocks practical use of Gemini 3.1 Pro on Vertex in OpenClaw conversations
  • Frequency: observed consistently in this environment during testing
  • Consequence: model appears unusable in real OpenClaw chats, and users may misdiagnose it as a GCP auth/quota issue even when Vertex Playground works

Additional information

This looks more like an OpenClaw provider/runtime handling issue than a Vertex AI configuration issue, because:

  • Vertex Playground works with Gemini 3.1 Pro
  • OpenClaw can successfully use google-vertex/gemini-3-flash-preview
  • OpenClaw reaches Vertex with Gemini 3.1 Pro, but stores the response as an empty assistant message

This may be related to other google-vertex runtime issues already reported, but the symptom here is slightly different from visible crash reports:

  • instead of throwing an error,
  • the run finishes with stopReason=stop and empty text

Regression status: NOT_ENOUGH_INFO

extent analysis

TL;DR

The issue might be resolved by updating the OpenClaw configuration or the google-vertex provider to correctly handle the gemini-3.1-pro-preview model, as it works in Vertex Playground and with google-vertex/gemini-3-flash-preview in the same environment.

Guidance

  • Verify that the google-vertex provider in OpenClaw is correctly configured to handle the gemini-3.1-pro-preview model, checking for any specific requirements or settings that might differ from gemini-3-flash-preview.
  • Check the OpenClaw logs for any subtle errors or warnings that might indicate why the response from Vertex AI is being saved as an empty string, even though the request is successful.
  • Compare the runtime handling of gemini-3.1-pro-preview and gemini-3-flash-preview in OpenClaw to identify any differences that could cause the empty response issue.
  • Consider testing with a different Vertex region, if possible, to see if the issue is region-specific, although the problem seems more related to OpenClaw's handling of the model.

Example

No specific code example can be provided without more details on the OpenClaw and google-vertex provider configurations. However, the fix likely involves adjusting how OpenClaw processes responses from the gemini-3.1-pro-preview model.

Notes

The issue seems specific to how OpenClaw handles the gemini-3.1-pro-preview model, given that gemini-3-flash-preview works and Vertex Playground also works with Gemini 3.1 Pro. This suggests a potential compatibility or configuration issue rather than a problem with Vertex AI itself.

Recommendation

Apply a workaround by potentially adjusting the OpenClaw configuration for the google-vertex provider to better handle the gemini-3.1-pro-preview model, as the issue appears to be related to how OpenClaw processes the response from this specific model.

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

The assistant should return normal text output, similar to:

  • Vertex Playground using Gemini 3.1 Pro
  • google-vertex/gemini-3-flash-preview in the same OpenClaw install

Still need to ship something?

×6

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

Back to top recommendations

TRENDING