概述
Gemini 搜索通过 Google Search grounding 提供 AI 合成答案,返回带引用的综合回答(而非结构化结果列表)。默认模型为 gemini-2.5-flash。
核心功能
- Google Search grounding:AI 合成答案 + 内联引用
- 支持时间过滤:
freshness(day/week/month/year)、date_after/date_before - 引用 URL 自动从 Google 重定向 URL 解析为直接 URL
- 可复用
models.providers.google.apiKey作为低优先级回退 - 自动检测优先级:order 20
配置/使用
{
plugins: {
entries: {
google: {
config: {
webSearch: {
apiKey: "AIza...",
model: "gemini-2.5-flash",
baseUrl: "https://generativelanguage.googleapis.com/v1beta",
},
},
},
},
},
tools: {
web: {
search: { provider: "gemini" },
},
},
}凭证优先级:plugins.entries.google.config.webSearch.apiKey → GEMINI_API_KEY → models.providers.google.apiKey
注意事项
- 返回一个合成答案(带引用),而非 N 条结果列表
count参数被接受但不改变响应形状- 不支持
country、language、domain_filter - 引用 URL 解析使用严格 SSRF 防护,重定向到私有/内部目标会被阻止
相关页面
- concepts/tool-web — Web 搜索工具总览与提供商对比
- concepts/tool-grok-search — Grok 搜索(xAI web grounding)
- concepts/tool-kimi-search — Kimi 搜索(Moonshot web search)