openclaw - 💡(How to fix) Fix [Bug]: proxy not working on google llm [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#72057Fetched 2026-04-27 05:35:32
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
labeled ×2

When I update openclaw container from ver 4.05 to 4.23, I find my google llm not work and the following networking error. I have setup HTTPS_PROXY and https_proxy in the compose file also works on curl https://generativelanguage.googleapis.com/v1beta/ in the container

Error: [agent/embedded] embedded run failover decision: runId=49be6b90-02fc-4be4-967f-ed3e87a4d60a stage=assistant decision=fallback_model reason=timeout from=google/gemini-3.1-flash-lite-preview profile=- rawError=fetch failed openclaw-gateway-1 | 2026-04-26T14:43:35.744+08:00 [diagnostic] lane task error: lane=main durationMs=71960 error="FailoverError: LLM request failed: network connection error." openclaw-gateway-1 | 2026-04-26T14:43:35.747+08:00 [diagnostic] lane task error: lane=session:agent:main:subagent:1660a83e-8cc9-4663-b653-27c227043c5d durationMs=71965 error="FailoverError: LLM request failed: network connection error."

This is the result from openclaw analysis: 我已经分析了 Google TTS 能正确使用代理而 LLM API 不能的根本原因,并记录在 google_tts_proxy_analysis.md 文件中。

核心发现 Google TTS 成功使用代理的原因:

使用 postJsonRequest 函数(来自 openclaw/plugin-sdk/provider-http) 这个函数正确集成了 OpenClaw 的代理系统 自动检测环境变量中的代理设置并使用 Google LLM API 失败的原因:

使用 buildGuardedModelFetch 函数 虽然能检测到代理环境,但没有强制启用代理模式 默认使用 GUARDED_FETCH_MODE.STRICT 模式,忽略代理设置 技术差异 功能 HTTP 客户端 代理支持 代理模式 Google TTS postJsonRequest ✅ 正确支持 env-proxy Google LLM API buildGuardedModelFetch ❌ 忽略代理 strict

Error Message

When I update openclaw container from ver 4.05 to 4.23, I find my google llm not work and the following networking error. Error: openclaw-gateway-1 | 2026-04-26T14:43:35.744+08:00 [diagnostic] lane task error: lane=main durationMs=71960 error="FailoverError: LLM request failed: network connection error." openclaw-gateway-1 | 2026-04-26T14:43:35.747+08:00 [diagnostic] lane task error: lane=session:agent:main:subagent:1660a83e-8cc9-4663-b653-27c227043c5d durationMs=71965 error="FailoverError: LLM request failed: network connection error."

Root Cause

When I update openclaw container from ver 4.05 to 4.23, I find my google llm not work and the following networking error. I have setup HTTPS_PROXY and https_proxy in the compose file also works on curl https://generativelanguage.googleapis.com/v1beta/ in the container

Error: [agent/embedded] embedded run failover decision: runId=49be6b90-02fc-4be4-967f-ed3e87a4d60a stage=assistant decision=fallback_model reason=timeout from=google/gemini-3.1-flash-lite-preview profile=- rawError=fetch failed openclaw-gateway-1 | 2026-04-26T14:43:35.744+08:00 [diagnostic] lane task error: lane=main durationMs=71960 error="FailoverError: LLM request failed: network connection error." openclaw-gateway-1 | 2026-04-26T14:43:35.747+08:00 [diagnostic] lane task error: lane=session:agent:main:subagent:1660a83e-8cc9-4663-b653-27c227043c5d durationMs=71965 error="FailoverError: LLM request failed: network connection error."

This is the result from openclaw analysis: 我已经分析了 Google TTS 能正确使用代理而 LLM API 不能的根本原因,并记录在 google_tts_proxy_analysis.md 文件中。

核心发现 Google TTS 成功使用代理的原因:

使用 postJsonRequest 函数(来自 openclaw/plugin-sdk/provider-http) 这个函数正确集成了 OpenClaw 的代理系统 自动检测环境变量中的代理设置并使用 Google LLM API 失败的原因:

使用 buildGuardedModelFetch 函数 虽然能检测到代理环境,但没有强制启用代理模式 默认使用 GUARDED_FETCH_MODE.STRICT 模式,忽略代理设置 技术差异 功能 HTTP 客户端 代理支持 代理模式 Google TTS postJsonRequest ✅ 正确支持 env-proxy Google LLM API buildGuardedModelFetch ❌ 忽略代理 strict

RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

When I update openclaw container from ver 4.05 to 4.23, I find my google llm not work and the following networking error. I have setup HTTPS_PROXY and https_proxy in the compose file also works on curl https://generativelanguage.googleapis.com/v1beta/ in the container

Error: [agent/embedded] embedded run failover decision: runId=49be6b90-02fc-4be4-967f-ed3e87a4d60a stage=assistant decision=fallback_model reason=timeout from=google/gemini-3.1-flash-lite-preview profile=- rawError=fetch failed openclaw-gateway-1 | 2026-04-26T14:43:35.744+08:00 [diagnostic] lane task error: lane=main durationMs=71960 error="FailoverError: LLM request failed: network connection error." openclaw-gateway-1 | 2026-04-26T14:43:35.747+08:00 [diagnostic] lane task error: lane=session:agent:main:subagent:1660a83e-8cc9-4663-b653-27c227043c5d durationMs=71965 error="FailoverError: LLM request failed: network connection error."

This is the result from openclaw analysis: 我已经分析了 Google TTS 能正确使用代理而 LLM API 不能的根本原因,并记录在 google_tts_proxy_analysis.md 文件中。

核心发现 Google TTS 成功使用代理的原因:

使用 postJsonRequest 函数(来自 openclaw/plugin-sdk/provider-http) 这个函数正确集成了 OpenClaw 的代理系统 自动检测环境变量中的代理设置并使用 Google LLM API 失败的原因:

使用 buildGuardedModelFetch 函数 虽然能检测到代理环境,但没有强制启用代理模式 默认使用 GUARDED_FETCH_MODE.STRICT 模式,忽略代理设置 技术差异 功能 HTTP 客户端 代理支持 代理模式 Google TTS postJsonRequest ✅ 正确支持 env-proxy Google LLM API buildGuardedModelFetch ❌ 忽略代理 strict

Steps to reproduce

the proxy in docker compose file is never changed

HTTP_PROXY: http://192.168.56.1:10808 HTTPS_PROXY: http://192.168.56.1:10808

Expected behavior

I can see whether the api call is successed on https://aistudio.google.com/rate-limit

Actual behavior

NOT_ENOUGH_INFO

OpenClaw version

2026.4.23

Operating system

Docker version 26.1.4 on centos7

Install method

No response

Model

all google llm model

Provider / routing chain

models->google

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The Google LLM API request is failing due to a network connection error, likely caused by the buildGuardedModelFetch function ignoring the proxy settings.

Guidance

  • The buildGuardedModelFetch function is using the GUARDED_FETCH_MODE.STRICT mode, which ignores the proxy settings, causing the network connection error.
  • To mitigate this issue, you can try setting the GUARDED_FETCH_MODE to a mode that enables proxy support, such as GUARDED_FETCH_MODE.PROXY.
  • Verify that the HTTPS_PROXY and HTTP_PROXY environment variables are correctly set in the Docker Compose file and are being passed to the container.
  • Check the google_tts_proxy_analysis.md file for more information on the analysis of the Google TTS proxy usage.

Example

No code snippet is provided as the issue is related to the internal implementation of the buildGuardedModelFetch function.

Notes

The root cause of the issue is likely related to the difference in proxy support between the postJsonRequest function used by Google TTS and the buildGuardedModelFetch function used by Google LLM API.

Recommendation

Apply a workaround by modifying the GUARDED_FETCH_MODE to enable proxy support, as the issue is likely caused by the strict mode ignoring the proxy settings.

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

I can see whether the api call is successed on https://aistudio.google.com/rate-limit

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 [Bug]: proxy not working on google llm [1 participants]