# OpenClaw 2.0 整合 Gemini 3.7 Flash 與具引用的 Google Search 即時搜尋

> 📖 本站完整內容索引（documentation index）：[llms.txt](/llms.txt)

> 原作者：Philipp Schmid (@_philschmid) · 策展與摘要：EasyVibeCoding · 平台：X (Twitter) · 熱度：🔥 · 日期：2026-09-01

> 原始來源：https://x.com/_philschmid/status/2094426225573818511

## 證據與延伸閱讀

- [OpenClaw 2.0 整合 Gemini 3.7 Flash 與具引用的 Google Search 即時搜尋。](https://docs.openclaw.ai/releases/2026.8.1) — 一手來源 · 最後核對：2026-09-01 · 支持主張：The guide identifies OpenClaw v2026.8.1 changes, local API-key onboarding, the google/gemini-3.7-flash model reference, a browser Control UI, and automatic cited searches when fresh context is needed.
- [OpenClaw 2.0 with Gemini 3.7 Flash — docs.openclaw.ai](https://docs.openclaw.ai/tools/gemini-search) — 一手來源 · 最後核對：2026-09-01 · 支持主張：The guide identifies OpenClaw v2026.8.1 changes, local API-key onboarding, the google/gemini-3.7-flash model reference, a browser Control UI, and automatic cited searches when fresh context is needed.
- [OpenClaw 2.0 with Gemini 3.7 Flash — docs.openclaw.ai](https://docs.openclaw.ai/tools/image-generation) — 一手來源 · 最後核對：2026-09-01 · 支持主張：The guide identifies OpenClaw v2026.8.1 changes, local API-key onboarding, the google/gemini-3.7-flash model reference, a browser Control UI, and automatic cited searches when fresh context is needed.
- [OpenClaw 2.0 with Gemini 3.7 Flash — docs.openclaw.ai](https://docs.openclaw.ai/tools/video-generation) — 一手來源 · 最後核對：2026-09-01 · 支持主張：The guide identifies OpenClaw v2026.8.1 changes, local API-key onboarding, the google/gemini-3.7-flash model reference, a browser Control UI, and automatic cited searches when fresh context is needed.
- [OpenClaw 2.0 with Gemini 3.7 Flash — docs.openclaw.ai](https://docs.openclaw.ai/tools/music-generation) — 一手來源 · 最後核對：2026-09-01 · 支持主張：The guide identifies OpenClaw v2026.8.1 changes, local API-key onboarding, the google/gemini-3.7-flash model reference, a browser Control UI, and automatic cited searches when fresh context is needed.
- [OpenClaw 2.0 with Gemini 3.7 Flash — docs.openclaw.ai](https://docs.openclaw.ai/providers/google) — 一手來源 · 最後核對：2026-09-01 · 支持主張：The guide identifies OpenClaw v2026.8.1 changes, local API-key onboarding, the google/gemini-3.7-flash model reference, a browser Control UI, and automatic cited searches when fresh context is needed.
- [OpenClaw 2.0 with Gemini 3.7 Flash — docs.openclaw.ai](https://docs.openclaw.ai/channels) — 一手來源 · 最後核對：2026-09-01 · 支持主張：The guide identifies OpenClaw v2026.8.1 changes, local API-key onboarding, the google/gemini-3.7-flash model reference, a browser Control UI, and automatic cited searches when fresh context is needed.
- [OpenClaw 2.0 with Gemini 3.7 Flash — blog.google（貼文明示來源）](https://blog.google/innovation-and-ai/models-and-research/gemini-models/introducing-gemini-3-7-flash) — 一手來源 · 支持主張：The guide identifies OpenClaw v2026.8.1 changes, local API-key onboarding, the google/gemini-3.7-flash model reference, a browser Control UI, and automatic cited searches when fresh context is needed.
- [OpenClaw 2.0 with Gemini 3.7 Flash — artificialanalysis.ai（貼文明示來源）](https://artificialanalysis.ai/) — 一手來源 · 支持主張：The guide identifies OpenClaw v2026.8.1 changes, local API-key onboarding, the google/gemini-3.7-flash model reference, a browser Control UI, and automatic cited searches when fresh context is needed.
- [OpenClaw 2.0 with Gemini 3.7 Flash — openclaw.ai（貼文明示來源）](https://openclaw.ai/) — 一手來源 · 支持主張：The guide identifies OpenClaw v2026.8.1 changes, local API-key onboarding, the google/gemini-3.7-flash model reference, a browser Control UI, and automatic cited searches when fresh context is needed.
- [OpenClaw 2.0 with Gemini 3.7 Flash — openclaw.ai（貼文明示來源）](https://openclaw.ai/blog/openclaw-2-accidentally) — 一手來源 · 支持主張：The guide identifies OpenClaw v2026.8.1 changes, local API-key onboarding, the google/gemini-3.7-flash model reference, a browser Control UI, and automatic cited searches when fresh context is needed.
- [OpenClaw 2.0 with Gemini 3.7 Flash — aistudio.google.com（貼文明示來源）](https://aistudio.google.com/apikey) — 一手來源 · 支持主張：The guide identifies OpenClaw v2026.8.1 changes, local API-key onboarding, the google/gemini-3.7-flash model reference, a browser Control UI, and automatic cited searches when fresh context is needed.
- [Philipp Schmid 發布 OpenClaw 2.0 安裝教學](https://x.com/_philschmid/status/2094426225573818511)

## 中文摘要

OpenClaw 2.0 整合 Gemini 3.7 Flash 與具引用的 Google Search 即時搜尋。

它把 Gemini 3.7 Flash、瀏覽器控制與具引用的即時搜尋整合到同一個 Agent 工作環境。

**核心更新**  
Philipp Schmid（@_philschmid）於 2026-08-31 發布〈Setup OpenClaw 2.0 with Gemini in Under 60 Seconds〉[原文貼文](https://x.com/_philschmid/status/2094426225573818511)，宣稱可用五個指令在 under a minute 安裝 OpenClaw 2.0（v2026.8.1）、連接 `google/gemini-3.7-flash`，並啟用 Google Search grounding。貼文畫面依序顯示 13、21、131、67K、163，以及 67.3K Views，時間為 10:04 PM；「+300 token/sec」與 under a minute 的速度宣稱並非獨立效能測量。

OpenClaw 可依使用者規則執行 browser automation、terminal execution、filesystem access 與 web search grounding，也會跨 sessions 保存 preferences、projects、people 的記憶。它支援 browser Control UI，以及 Telegram、Discord、WhatsApp、Slack 等聊天管道；v2026.8.1 另重建 browser app，讓使用者直接進入 conversation，並可透過與 Claw 對話完成設定。

**本機安裝與 Gemini 連線**  
前置條件是 Node 26（recommended），或 Node 22.22.3+／24.15+，以及 Google AI Studio 的免費 Gemini API Key。固定版本的安裝與驗證指令如下：

```bash
npm install -g openclaw@2026.8.1
openclaw --version
# Output: OpenClaw 2026.8.1 (ea80657)
```

文件中的 `2026.9.1-beta.1` 套件標示有誤，實際上是 `2026.8.1-beta.4`，不比 stable `2026.8.1` 新；stable 使用者應安裝或更新至 `2026.8.1`。以下 onboarding 會將 API key 先放入目前 shell，再寫入 OpenClaw 的 local profile store：

```bash
export GEMINI_API_KEY="your-gemini-api-key-here"
openclaw onboard --non-interactive --accept-risk --skip-health \
  --mode local \
  --auth-choice gemini-api-key \
  --gemini-api-key "$GEMINI_API_KEY"
```

其中 `--mode local`、`--auth-choice gemini-api-key`、`--accept-risk` 等條件不可省略。`--accept-risk` 是來源教學要求的風險接受參數，屬於需人工核對的來源指令，不應在未審查權限與資料存取範圍前直接執行。若 onboarding 要求 Brave API key，來源稱可忽略，因為 Gemini 內建的 Google Search grounding 會自動使用。

接著設定與檢查 model：

```bash
openclaw models set google/gemini-3.7-flash
openclaw models list --provider google
openclaw agent --local --agent main --message "Hello! What model are you running?"
```

若本地 catalog 暫時找不到該 model，文件稱可忽略，因為後續會向 Google AI Studio 動態 resolve 並 validate；CLI turn 的回應應指出 `google/gemini-3.7-flash`。

**Gateway、Control UI 與搜尋**  
Gateway 必須先設為 local mode，再啟動並以 browser 開啟 Control UI。教學使用本機位址 [Control UI](http://127.0.0.1:18789/) 與 local session token 驗證：

```bash
openclaw config set gateway.mode local
openclaw gateway run
openclaw gateway install && openclaw gateway start
openclaw gateway stop --force
openclaw dashboard
```

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/5226b7f423c94700.jpg)
> OpenClaw 2.0 (v2026.8.1) 終端機操作介面，顯示設定 Gemini 3.7 Flash 模型的指令、互動測試訊息以及區域網路閘道器狀態。

只要存在 `GEMINI_API_KEY`，Google Search grounding 預設啟用，不需額外 configuration 或 search keys。可先在非關鍵 profile 測試：

```bash
openclaw capability web search --query "Latest gemini models"
```

在聊天 session 中，Gemini 會在需要 fresh context 時自主執行帶 citations 的 web searches。其結果不是傳統的 links/snippets 清單，而是由即時 Google Search results 支撐、附 inline citations 的 AI-synthesized answer；文件見 [Gemini search - OpenClaw Docs](https://docs.openclaw.ai/tools/gemini-search)。

搜尋憑證優先順序為 `plugins.entries.google.config.webSearch.apiKey` → `GEMINI_API_KEY` → `models.providers.google.apiKey`，Gateway install 也可把環境變數放在 `~/.openclaw/.env`。設定方式如下：

```bash
openclaw configure --section web
```

```json5
{
  plugins: {
    entries: {
      google: {
        config: {
          webSearch: {
            apiKey: "AIza...",
            baseUrl: "https://generativelanguage.googleapis.com/v1beta",
            model: "gemini-2.5-flash"
          }
        }
      }
    }
  },
  tools: { web: { search: { provider: "gemini" } } }
}
```

`webSearch.baseUrl` 優先於 `models.providers.google.baseUrl`；若只設定 `https://generativelanguage.googleapis.com`，會正規化成 `https://generativelanguage.googleapis.com/v1beta`。支援參數包括 `query`、`freshness`、`date_after`、`date_before`；`count` 僅為 shared `web_search` 相容性參數，仍只回傳一個含 citations 的 synthesized answer。`day`／`pd` 只是加入 recency instruction，不是硬性的 24-hour range；`week`、`month`、`year` 與明確日期範圍才會設定 `timeRangeFilter`。`country`、`language`、`domain_filter` 不支援。

引用網址會經由 SSRF-guarded fetch path，以 `HEAD` 解析 Google redirect URLs，遵守 strict SSRF defaults，並阻擋導向 private/internal targets 的 redirect。自訂 headers 若含 secret，必須使用 `SecretRef`；無效欄位，以及 `Content-Length`、`Host`、`Transfer-Encoding` 等 transport-owned names，會在 cache lookup 或 network I/O 前使搜尋失敗。

**模型與 Google provider**  
[Google (Gemini) 文件](https://docs.openclaw.ai/providers/google)列出 Google AI Studio 的 `google` provider，以及使用 Google Cloud Application Default Credentials 的 managed-cloud `google-vertex`。一般安裝建議使用 AI Studio API key：

```bash
openclaw onboard --auth-choice gemini-api-key
openclaw onboard --non-interactive --accept-risk --skip-health \
  --mode local \
  --auth-choice gemini-api-key \
  --gemini-api-key "$GEMINI_API_KEY"
openclaw models list --provider google
```

預設 model 範例是 `google/gemini-3.1-pro-preview`。Gemini 3 Pro、Flash、Flash-Lite 的新 variant 可由 Gemini `models.list` API 動態刷新；若 discovery 失敗，OpenClaw 會保留 bundled fallback catalog。`google/gemini-3-pro-preview` 已於 2026-03-09 retired，應改用 `google/gemini-3.1-pro-preview`。

`google-gemini-cli` runtime 僅適合 advanced use，仍須先有可用的 Google AI Studio API-key profile，且本機 `gemini` command 必須在 `PATH`。Google 已於 2026-06-18 結束 consumer Gemini CLI Login with Google；Antigravity terms 也禁止 third-party tools 透過 Antigravity OAuth 存取服務。既有有效 OAuth profile 仍可能因相容性執行，但 OpenClaw 無法建立或修復，失效時應改用 AI Studio API key 或 Vertex AI。

```bash
brew install gemini-cli
# 或
npm install -g @google/gemini-cli
```

```json5
{
  agents: {
    defaults: {
      model: { primary: "google/gemini-3.1-pro-preview" },
      models: {
        "google/gemini-3.1-pro-preview": {
          agentRuntime: { id: "google-gemini-cli" }
        }
      }
    }
  }
}
```

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/dc1d9f945809e7f3.jpg)
> Dark-mode 介面的聊天對話視窗，上方顯示使用者詢問模型名稱，下方由助理回覆正在執行 google/gemini-3.7-flash 模型，並附帶執行時間、token 數量以及底部輸入框與相關設定選項。

Gemini 3、Gemini 3.1 與 `gemini-*-latest` alias 使用 `thinkingLevel`，不是 `thinkingBudget`；Gemini 2.5 使用 `thinkingBudget: -1`，Gemma 4 會改寫成支援的 Google `thinkingLevel`。`thinking: off` 維持停用，不會映射成 `MINIMAL`；Gemini 2.5 Pro 只能在 thinking mode 運作。

**多媒體能力與非同步任務**  
OpenClaw 已將圖片、影片與 music generation 納入 shared task/status flow。工具只有在至少一個可用 provider 存在時才顯示，完成後會喚醒原 session；若 session 不活躍或 wake 失敗，才使用 idempotent direct fallback 傳送遺漏的 media。這些 provider、model 與 versioned commands 可能變更，不是永久支援承諾。

- `image_generate` 支援 `openai/gpt-image-2`、`openai/gpt-image-1.5`、`google/gemini-3.1-flash-image`、`deepinfra/black-forest-labs/FLUX-1-schnell`、`fal/krea/v2/medium/text-to-image`、`openrouter/google/gemini-3.1-flash-image-preview` 等。shared tool 最多 14 張參考圖，但 Google、LiteLLM、OpenAI、OpenRouter 最多 5 張，xAI 最多 3 張；provider 的生成數、size、aspect ratio、透明背景與 edit 能力各不相同。[Image generation 文件](https://docs.openclaw.ai/tools/image-generation)中的預設設定為：

```json5
{
  agents: {
    defaults: {
      mediaModels: {
        image: {
          primary: "openai/gpt-image-2",
          timeoutMs: 180000,
        },
      },
    },
  },
}
```

```text
/tool image_generate action=list
/tool image_generate action=status
```

- `video_generate` 支援 `generate`、`imageToVideo`、`videoToVideo`，可使用 `first_frame`、`last_frame`、`reference_image`、`reference_video` 與單一 `audioRef`。文件列出 16 個 provider backends；生成通常需 30 seconds to several minutes，shared media limit 預設為 16MB。[Video generation 文件](https://docs.openclaw.ai/tools/video-generation)的快速設定是：

```bash
export GEMINI_API_KEY="your-key"
openclaw config set agents.defaults.mediaModels.video.primary "google/veo-3.1-fast-generate-preview"
```

工作可用下列指令查詢或取消：

```bash
openclaw tasks list
openclaw tasks show <lookup>
openclaw tasks cancel <lookup>
```

影片 live test 預設 timeout 為 180000；fal 需明確 opt-in：

```bash
pnpm test:live:media video --video-providers fal
```

- `music_generate` 可使用 ComfyUI、fal、Google、MiniMax、OpenRouter；Google 預設 `google/lyria-3-clip-preview`，MiniMax 僅輸出 mp3，Google 最多 10 張 reference images，OpenRouter 最多 1 張。相同 request 在最近完成後 2 minutes 內會 deduplicate，timeout 低於 `120000ms` 時會提升至 `120000ms`。[Music generation 文件](https://docs.openclaw.ai/tools/music-generation)的範例為：

```json5
{
  agents: {
    defaults: {
      mediaModels: {
        music: {
          primary: "google/lyria-3-clip-preview",
        },
      },
    },
  },
}
```

```text
/tool music_generate prompt="Warm ambient synth loop with soft tape texture"
/tool music_generate action=list
/tool music_generate action=status
/tool music_generate prompt="Dreamy lo-fi hip hop with vinyl texture and gentle rain" instrumental=true
```

音樂 live tests 是 opt-in：

```bash
OPENCLAW_LIVE_TEST=1 pnpm test:live -- extensions/music-generation-providers.live.test.ts
pnpm test:live:media:music
OPENCLAW_LIVE_TEST=1 COMFY_LIVE_TEST=1 pnpm test:live -- extensions/comfy/comfy.live.test.ts
```

**版本遷移與安全邊界**  
v2026.8.1 將 sessions 與 transcripts 遷移至 SQLite。降級到較舊的 file-backed release 前，必須用目前 CLI 還原 archived legacy transcript artifacts；migration 後建立的 sessions 不會出現在舊版本，升級前也應建立 verified backup。reset 雖會先驗證 provider、Gateway、migration 與 workspace 選擇，再把既有資料移至 Trash，但確認後仍具 destructive 性。

從 Claude、Codex、Hermes 匯入時，資料會先進 temporary staging area，待 model route 驗證或修復後才啟用；若 source、import plan 或 destination 中途改變，promotion 會停止，不會把半完成 import 重播到不同資料。重新 onboarding 預設保留既有 workspace，除非使用者核准搬移；named agents 會保留 credentials。

**Chat channels 與 room introduction**  
OpenClaw 可經由 [Chat channels 文件](https://docs.openclaw.ai/channels)連接 Discord、Feishu、Google Chat、iMessage、IRC、LINE、Matrix、Mattermost、Microsoft Teams、Signal、Slack、Telegram、WebChat、WeChat、WeCom、WhatsApp、Zalo 等多個 channel；所有 channel 支援文字，但 media 與 reactions 依 channel 而異。Telegram 是 bundled plugin，WebChat 隨 core 提供；WeChat、WeCom、Yuanbao、Zalo ClawBot 是 external plugin。安裝 official plugin 的指令如下：

```bash
openclaw plugins install @openclaw/<id>
openclaw onboard
openclaw channels add
```

Discord、LINE、Matrix、Slack、Telegram 的 bot 加入允許 group 後，預設會發布一次 room-specific introduction。可用 `channels.<channel>.joinIntro: false` 關閉，或用 `channels.<channel>.accounts.<accountId>.joinIntro` 覆寫帳號；解析順序是 account、channel、預設值 `true`。每個 room 僅執行一次，保留 90-day durable claim，reconnect 或 Gateway restart 不會重複。

Introduction 最多讀取 100 則近期訊息及 room metadata，再截斷為 12,000 characters；無法讀取歷史時仍只描述實際可見內容，不臆造 activity。room title、topic、pinned text 與 message history 都會被視為 untrusted external content，該 turn 完全不可用 tools、上限 60 seconds、永不在 direct messages 執行，也不會繞過 channel access policy。

![](https://pub-75d4fe1e4e80421b9ecb1245a7ae0d1a.r2.dev/curated/f914bada5df9d51a.jpg)
> 黑色背景的聊天介面視窗，標題列顯示 workspace / Hello! What model are you running?，對話中互動詢問所執行的模型並要求使用 Google Search 查詢 Alphabet GOOGL 的最新股價，畫面回應模型為 google/gemini-3.7-flash，並列出執行 Google Search 的細節、查詢結果 $346.00 與來源清單，底部輸入框標示 Message Assistant、Default (Full access)、Gemini 3.7 Flash 及 Medium。

## 標籤

功能更新, 開源專案, OpenClaw 2.0, Gemini 3.7 Flash, Google Search, Google AI Studio, Telegram, Discord, WhatsApp, Slack, Philipp Schmid
