Brave 计费变更应急:切换 Perplexity/OpenRouter 作为 web_search 备援
用于 Brave Search 免费额度变化导致新用户 `missing_brave_api_key` 或成本不可控场景。前置:可修改 tools.web.search 配置。步骤:评估查询量→配置 Perplexity/OpenRouter key→切换 `provider` 并回归 `web_search`/`web_fetch` 路径→监控 15 分钟缓存命中。关键配置:`tools.web.search.provider`。验证:搜索可用且成本路径明确。风险:Provider 返回格式差异会影响下游解析。
GITHUBDiscovered 2026-02-15Author orophix
Prerequisites
- You have either Brave, Perplexity, or OpenRouter API credentials.
- Gateway config can be updated and restarted.
Steps
- Estimate daily query volume and decide whether to keep Brave or move to Perplexity/OpenRouter.
- Configure credentials via `openclaw configure --section web` (or service env vars).
- Set `tools.web.search.provider` and run smoke tests for `web_search` + `web_fetch` fallback behavior.
- Track cache hit ratio and provider latency/cost for at least one full day.
Commands
openclaw configure --section webopenclaw gateway restartopenclaw gateway statusVerify
`web_search` returns valid results under chosen provider and no missing-key failures appear.
Caveats
- Perplexity answer-style results may need parser adjustments vs Brave structured snippets.
- Current pricing/limits change frequently; re-check provider portal before capacity planning(需验证).
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗