openclaw - ✅(Solved) Fix [Bug]: google-vertex/gemini-3.1-pro-preview empty replies due to incorrect thinkingConfig disable path [1 pull requests, 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#62470Fetched 2026-04-08 03:03:49
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
labeled ×2cross-referenced ×1referenced ×1renamed ×1

Under a working Vertex setup with GOOGLE_CLOUD_LOCATION=global, OpenClaw returns an empty assistant reply for google-vertex/gemini-3.1-pro-preview, while google-vertex/gemini-3-flash-preview and direct Vertex calls to gemini-3.1-pro-preview return normal text.

Root Cause

google-vertex/gemini-3.1-pro-preview should return visible text in OpenClaw, because direct Vertex publisher API calls to the same model under the same credentials/project/location return normal text output.

Fix Action

Fixed

PR fix notes

PR #62473: fix: use thinkingBudget: 0 to disable thinking for Gemini 3 Pro models (fixes #62470)

Description (problem / solution / changelog)

Auto-generated by openclaw auto-builder.

fix: use thinkingBudget: 0 to disable thinking for Gemini 3 Pro models (fixes #62470)

Changed files

  • src/agents/google-transport-stream.ts (modified, +2/-4)

Code Example

- Verified in OpenClaw:
  - `google-vertex/gemini-3-flash-preview` works again when region is set to `global`
  - `google-vertex/gemini-3.1-pro-preview` still returns empty replies under the same config
- Direct Vertex API tests for `gemini-3.1-pro-preview` returned visible text, which rules out a general Vertex outage or broken credentials.
- Code inspection of the OpenClaw dist bundle found the Google transport request path for Gemini 3 / 3.1 Pro uses a disabled-thinking path that can inject:
  - `thinkingConfig: { thinkingLevel: "LOW" }`
- Live repro against Vertex showed:
  - `gemini-3.1-pro-preview` with small output budget and `thinkingLevel: "LOW"` can return:
    - no visible `parts[].text`
    - `finishReason: "MAX_TOKENS"`
    - nonzero thought-token usage
  - `gemini-3.1-pro-preview` with `thinkingBudget: 0` returned visible text
- This supports that the empty reply is caused by the outgoing thinking config/path, not by broken Vertex auth.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

Under a working Vertex setup with GOOGLE_CLOUD_LOCATION=global, OpenClaw returns an empty assistant reply for google-vertex/gemini-3.1-pro-preview, while google-vertex/gemini-3-flash-preview and direct Vertex calls to gemini-3.1-pro-preview return normal text.

Steps to reproduce

  1. Run OpenClaw 2026.4.5 with valid Google Vertex credentials and GOOGLE_CLOUD_LOCATION=global.
  2. Set the model to google-vertex/gemini-3.1-pro-preview.
  3. Keep the same config otherwise; in my case, thinking default was set to medium.
  4. Send a simple prompt such as Reply with exactly: OK.
  5. Observe that OpenClaw returns an empty assistant reply.
  6. Change only the model to google-vertex/gemini-3-flash-preview under the same config and observe normal text output.

Expected behavior

google-vertex/gemini-3.1-pro-preview should return visible text in OpenClaw, because direct Vertex publisher API calls to the same model under the same credentials/project/location return normal text output.

Actual behavior

OpenClaw returns an empty assistant reply for google-vertex/gemini-3.1-pro-preview under a working Vertex configuration. Under the same configuration, google-vertex/gemini-3-flash-preview returns normal text.

OpenClaw version

v2026.4.5

Operating system

Debian 12 / Linux 6.1.0-38-amd64

Install method

npm global

Model

google-vertex/gemini-3.1-pro-preview

Provider / routing chain

openclaw -> bundled Google provider (google-vertex) -> Vertex AI publisher API

Additional provider/model setup details

  • GOOGLE_CLOUD_LOCATION=global
  • Vertex auth/project/env are valid
  • The same environment works for:
    • google-vertex/gemini-3-flash-preview inside OpenClaw
    • direct Vertex publisher API calls to both gemini-3-flash-preview and gemini-3.1-pro-preview
  • Thinking default in openclaw.json was set to medium

Logs, screenshots, and evidence

- Verified in OpenClaw:
  - `google-vertex/gemini-3-flash-preview` works again when region is set to `global`
  - `google-vertex/gemini-3.1-pro-preview` still returns empty replies under the same config
- Direct Vertex API tests for `gemini-3.1-pro-preview` returned visible text, which rules out a general Vertex outage or broken credentials.
- Code inspection of the OpenClaw dist bundle found the Google transport request path for Gemini 3 / 3.1 Pro uses a disabled-thinking path that can inject:
  - `thinkingConfig: { thinkingLevel: "LOW" }`
- Live repro against Vertex showed:
  - `gemini-3.1-pro-preview` with small output budget and `thinkingLevel: "LOW"` can return:
    - no visible `parts[].text`
    - `finishReason: "MAX_TOKENS"`
    - nonzero thought-token usage
  - `gemini-3.1-pro-preview` with `thinkingBudget: 0` returned visible text
- This supports that the empty reply is caused by the outgoing thinking config/path, not by broken Vertex auth.

Impact and severity

  • Affected: users routing Gemini 3.1 Pro through google-vertex in OpenClaw
  • Severity: High (the model returns no visible output, so it is not usable through this path)
  • Frequency: Repeated during testing under the same working Vertex configuration
  • Consequence: google-vertex/gemini-3.1-pro-preview cannot be used reliably in OpenClaw even though Vertex itself is working

Additional information

I traced the relevant bundled dist code and the effective request/response path appears to involve:

  • dist/extensions/google/index.js
  • dist/api-C29T3o68.js
  • dist/anthropic-vertex-stream-BySayhWO.js
  • dist/proxy-stream-wrappers-C_9sn9XU.js

Observed code-inspection direction for triage:

  • google-vertex is routed through the Google transport path, not a separate Vertex-specific parser.
  • In dist/anthropic-vertex-stream-BySayhWO.js, the request builder has a Gemini 3 / 3.1 Pro path that can populate thinkingConfig.
  • In direct testing outside OpenClaw, a thinkingConfig path using thinkingLevel: "LOW" for gemini-3.1-pro-preview could reproduce a response with no visible text parts, while thinkingBudget: 0 returned visible text.
  • Because my OpenClaw config had thinking default set to medium, this may indicate that OpenClaw is either:
    • sending an unexpected thinkingConfig for this model, or
    • not correctly respecting the configured thinking level, or
    • allowing hidden thinking to consume the visible output budget before any final text is emitted.

extent analysis

TL;DR

The most likely fix for the empty assistant reply issue with google-vertex/gemini-3.1-pro-preview in OpenClaw is to adjust the thinking configuration to prevent it from interfering with the visible output.

Guidance

  • Verify that the thinkingConfig is being sent correctly for the google-vertex/gemini-3.1-pro-preview model by inspecting the request builder in dist/anthropic-vertex-stream-BySayhWO.js.
  • Check if setting thinkingBudget: 0 in the OpenClaw configuration resolves the issue, as it did in direct Vertex API tests.
  • Investigate why the default thinking level set to medium in openclaw.json may not be respected or may be causing hidden thinking to consume the visible output budget.
  • Review the code in dist/extensions/google/index.js, dist/api-C29T3o68.js, and dist/proxy-stream-wrappers-C_9sn9XU.js to ensure that the Google transport path is not modifying the thinking configuration in an unexpected way.

Example

No code snippet is provided as the issue is more related to configuration and the interaction between OpenClaw and the Vertex AI publisher API.

Notes

The issue seems to be specific to the google-vertex/gemini-3.1-pro-preview model and the way OpenClaw is configuring the thinking settings for this model. The fact that direct Vertex API calls work correctly suggests that the issue is not with the Vertex API itself, but rather with how OpenClaw is interacting with it.

Recommendation

Apply a workaround by setting thinkingBudget: 0 in the OpenClaw configuration for the google-vertex/gemini-3.1-pro-preview model, as this has been shown to resolve the issue in direct Vertex API tests. This will prevent the thinking configuration from interfering with the visible output.

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/gemini-3.1-pro-preview should return visible text in OpenClaw, because direct Vertex publisher API calls to the same model under the same credentials/project/location return normal text output.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING