Search providers

The multi-provider search fan-out, reciprocal rank fusion, and model overrides.

Every search query fans out concurrently to all configured providers. Different modalities — search-grounded LLM, semantic, agent-ranked, keyword + scrape — surface disjoint slices of the web, so adding providers widens coverage rather than duplicating it. Providers activate automatically when their API key is set; no other configuration is needed.

Providers

ProviderKeyModalityContributes
AI Gateway (always on)AI_GATEWAY_API_KEYSearch-grounded model (default perplexity/sonar)URLs + titles from the response's cited sources — never from generated text, so URLs are real
ExaEXA_API_KEYSemantic searchPage text inline (up to 8,000 chars), letting verification skip the page fetch
ParallelPARALLEL_API_KEYAgent-oriented, LLM-ranked searchExtended excerpts — used as page content only when substantial (≥ 2,000 chars combined), otherwise verification fetches the full page
FirecrawlFIRECRAWL_API_KEYKeyword SERPResult pages scraped to markdown inline (up to 8,000 chars)

The gateway provider needs only AI_GATEWAY_API_KEY, which verification already requires — so a minimal deployment still searches. It prompts the search-grounded model to prefer pages dedicated to a single entity over listicles and comparison articles.

Reciprocal rank fusion

Each provider returns a ranked list. The lists are merged by URL (normalized: hash stripped, www. dropped) with RRF scoring:

score(url) = Σ over providers  1 / (60 + rank)

A URL surfaced by several providers accumulates score from each list, so cross-provider agreement outranks any single provider's top hit — exactly the signal you want when result slots are capped. When multiple providers return the same URL, the longest inline page text wins, and every provider's rank is recorded as provenance on the result.

Provider failures are isolated: if one provider errors, the others' results still merge, and the failure is reported per query.

Model overrides

The three pipeline models are Vercel AI Gateway model ids, each overridable via env so you can swap providers without code changes:

VariableDefaultRole
SEARCH_AGENT_MODELanthropic/claude-sonnet-5The webset agent — planning and orchestration
SEARCH_VERIFICATION_MODELopenai/gpt-5.4-miniPer-candidate structured verification + extraction call
SEARCH_QUERY_MODELperplexity/sonarThe gateway search provider's search-grounded model

SEARCH_QUERY_MODEL must be a model with search grounding (it returns cited sources); the other two can be any gateway model. See Self-hosting for the full environment reference.

On this page