Repository navigation
feat!: codemode-websearch package, one websearch.query across twelve providers (SHFT-2967) - #102
Merged
Merged
Conversation
…for a key; tests for a signing host and the README table (SHFT-2967)
…he README (SHFT-2967)
…ptions is gone (SHFT-2967)
…ovider documents (SHFT-2967)
…ge variants (SHFT-2967)
….query (SHFT-2967)
…hrough Parallel (SHFT-2967)
…ovider input (SHFT-2967)
…efusal names the filters set (SHFT-2967)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
codemode-websearch, a package with one plugin and one action:websearch.querysearches the web through whichever provider the connection has a key for, and answers results in one shape (SHFT-2967).Twelve providers, ported from pi-websearch (the code Vex's
web_searchruns) with the same environment variables and preference order: Parallel, Brave, Exa, You.com, Tavily, Firecrawl, Jina, Linkup, Valyu, Perplexity, Serper, SerpAPI.The input
Each input has one form. Nothing in it is a provider's own parameter name, and nothing names a provider: the connection chooses it.
querynumResultscountrylanguageincludeDomains,excludeDomainsfreshnessday,week,month, oryearincludeDomains,excludeDomainsandfreshnessare filters: a provider applies them or the call is refused. Only Jina has none.provider, else to the first provider with a key that applies the search's filters. The result says which one answered.countryandlanguageare preferences: sent where the provider takes the value, left out where it does not.DEreaches Parallel asde, Tavily asgermany, Brave asDE. The lists each provider publishes are insrc/codes.ts.How
staticCredentialhas a part per provider, each optional and each placed only on that provider's target, so a search through one provider sends no other provider's key. No codemode change was needed.params,results) insrc/providers.ts. The plugin builds the credential target and sends the request, with no per-provider branches.websearch([mine, ...PROVIDERS]).Changed from pi-websearch
Read against each provider's current reference: Parallel
/v1beta/searchto/v1/search; Firecrawl v1 to v2, without a page scrape; You.com GET to POST; Valyu toapi.valyu.ai; Perplexity from a Sonar chat answer to its Search API; Jina GET to POST; SerpAPI withoutnum, which its reference no longer lists.Breaking
parallelplugin is removed, with its icon and fixture.parallel.searchis gone;websearch.querysearches through Parallel.docs/migrating-from-runline.mdhas "Install web search".Tests
53 tests with the providers' hosts stood in for: every provider's request and answer, key isolation, each filter and each code conversion per provider, refusals, a host that signs requests, a host-added provider, and the README's provider table derived from the provider list.
Not proven
site:filtering on Brave and Serper is the least certain mapping.