OpenClaw 支援內建 Google Search grounding 的 Gemini 模型,會傳回由即時 Google Search 結果支援、並附有引用的 AI 合成答案。Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
取得 API 金鑰
Create a key
前往 Google AI Studio 並建立
API 金鑰。
設定
GEMINI_API_KEY。
若是 Gateway 安裝,請將它放在 ~/.openclaw/.env。
運作方式
與傳統搜尋提供者傳回連結和摘要片段清單不同,Gemini 會使用 Google Search grounding 產生附有行內引用的 AI 合成答案。結果包含合成答案和來源 URL。- 來自 Gemini grounding 的引用 URL 會自動從 Google 重新導向 URL 解析為直接 URL。
- 重新導向解析會先使用 SSRF 防護路徑(HEAD + 重新導向檢查 + http/https 驗證),再傳回最終引用 URL。
- 重新導向解析使用嚴格的 SSRF 預設值,因此會封鎖重新導向到 私人/內部目標。
支援的參數
Gemini 搜尋支援query。
為了與共用的 web_search 相容,會接受 count,但 Gemini grounding
仍會傳回一個附有引用的合成答案,而不是 N 筆結果清單。
不支援提供者專屬篩選器,例如 country、language、freshness 和
domain_filter。
模型選擇
預設模型是gemini-2.5-flash(快速且具成本效益)。任何支援 grounding
的 Gemini 模型都可以透過
plugins.entries.google.config.webSearch.model 使用。
相關
- Web Search 概觀 — 所有提供者和自動偵測
- Brave Search — 含摘要片段的結構化結果
- Perplexity Search — 結構化結果 + 內容擷取