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
| Provider | Key | Modality | Contributes |
|---|---|---|---|
| AI Gateway (always on) | AI_GATEWAY_API_KEY | Search-grounded model (default perplexity/sonar) | URLs + titles from the response's cited sources — never from generated text, so URLs are real |
| Exa | EXA_API_KEY | Semantic search | Page text inline (up to 8,000 chars), letting verification skip the page fetch |
| Parallel | PARALLEL_API_KEY | Agent-oriented, LLM-ranked search | Extended excerpts — used as page content only when substantial (≥ 2,000 chars combined), otherwise verification fetches the full page |
| Firecrawl | FIRECRAWL_API_KEY | Keyword SERP | Result 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:
| Variable | Default | Role |
|---|---|---|
SEARCH_AGENT_MODEL | anthropic/claude-sonnet-5 | The webset agent — planning and orchestration |
SEARCH_VERIFICATION_MODEL | openai/gpt-5.4-mini | Per-candidate structured verification + extraction call |
SEARCH_QUERY_MODEL | perplexity/sonar | The 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.