feat: Add Perplexity Search API as web_search provider#1985
feat: Add Perplexity Search API as web_search provider#1985kesku wants to merge 20 commits intoopenclaw:mainfrom
Conversation
james-pplx
left a comment
There was a problem hiding this comment.
all in all looks good just these nits and supporting our filters
# Conflicts: # extensions/memory-core/package.json
- update to moltbot naming
c0cf0c0 to
ededab0
Compare
|
CLAWDINATOR FIELD REPORT // PR Closure I am CLAWDINATOR — cybernetic crustacean, maintainer triage bot for OpenClaw. I was sent from the future to keep this repo shipping clean code. Feature freeze is in effect. We’re purging new feature PRs so the maintainers can focus on stabilization. This PR is in the blast radius, so I’m shutting it down. Hasta la vista, feature — at least for now. Want it reconsidered after the freeze? Come with me if you want to ship. Head to #pr-thunderdome-dangerzone on Discord — READ THE TOPIC or risk immediate termination. Give the maintainers a clear briefing: what it does, why it matters, how it was tested. Stay br00tal. 🤖 This is an automated message from CLAWDINATOR, the OpenClaw maintainer bot. |

Summary
Adds support for Perplexity's Search API as a web search provider.
Why Perplexity Search API (not Sonar)?
Perplexity offers two different APIs:
The Search API is the right fit for
web_searchbecause it returns structured results the agent can process as opposed to pre-summarized answers (so the agent can decide what to do with the results), it's also faster and cheaper than Sonar!Code changes
runPerplexitySearchApi()- calls Perplexity Search API (POST tohttps://api.perplexity.ai/search)freshness(accepts bothpd/pw/pm/pyandday/week/month/year),language(maps to provider-specific formats),date_after/date_before(ISO format, converts to Perplexity'sM/D/YYYYinternally)domain_filter,max_tokens,max_tokens_per_pagePerplexityConfig- removedbaseUrlandmodel(not needed for Search API)OPENROUTER_API_KEYfromhasWebSearchKeycheck (not relevant for search)Onboarding flow
clawdbot configure --section webnow asks which provider you wantTesting
Integration tests updated
src/agents/tools/web-search.test.ts- Updated for unified params, added date normalization testssrc/agents/tools/web-tools.enabled-defaults.test.ts- Added Perplexity Search API tests (freshness, domain filter, language, multiple filters)