Admin Configuration
Configure in Admin → Sources → Web Search:| Setting | Description |
|---|---|
| Enable Web Search | Global toggle — when off, web search is hidden from all chat edit forms |
| Default Search Provider | System default provider used when a chat doesn’t specify one |
| Default Max Results | Default number of web results to inject (1–20) |
| Default Include Answer | Whether to include the provider’s AI-generated answer summary |
| Allow Provider Override | When off, chat owners cannot change the search provider — the system default is always used |
Chat-Level Configuration
Chat owners configure web search per chat in Chat Settings → Web Search:| Setting | IChatTabDBItem field | Description |
|---|---|---|
| Enable Web Search | webSearchEnabled | Per-chat toggle |
| Search Provider | webSearchProvider | Override the system default (if allowed by admin). Shows “System Default” when empty |
| Max Results | webSearchConfig.maxResults | Number of web results to inject per query |
| Include Answer | webSearchConfig.includeAnswer | Include AI-generated answer summary from the search provider |
| Search Depth | webSearchConfig.searchDepth | Tavily-specific: basic or advanced |
| Allowed Domains | webSearchConfig.includeDomains | Restrict search results to only these domains (e.g. docs.microsoft.com) |
| Excluded Domains | webSearchConfig.excludeDomains | Never include results from these domains (e.g. pinterest.com) |
| Pinned Pages | webSearchConfig.pinnedUrls | Specific URLs always fetched and injected as authoritative context |
End-User Sidebar Toggles
Chat owners can optionally allow end users to control web search features from the sidebar at runtime:| Setting | IChatTabDBItem field | Default | Description |
|---|---|---|---|
| Allow Web Search Toggle | allowUserWebSearchToggle | false | Users can enable/disable web search per session |
| Allow Pinned URL Edit | allowUserPinnedUrlEdit | false | Users can add/remove pinned URLs |
| Allow Include Domain Edit | allowUserIncludeDomainEdit | false | Users can add/remove allowed domains |
| Allow Exclude Domain Edit | allowUserExcludeDomainEdit | false | Users can add/remove excluded domains |
Search Providers
| Provider | Domain Filtering | Exclude Domains | Native API |
|---|---|---|---|
| Tavily | include_domains | exclude_domains | Native |
| Perplexity | search_domain_filter | Not supported | Native |
| Brave | site: query operator | -site: query operator | Query rewrite |
| Exa | includeDomains | excludeDomains | Native |
| SerpAPI | site: query operator | -site: query operator | Query rewrite |
#/admin/tool]) with their respective API keys.
Pinned Pages
Pinned pages are specific URLs that are always fetched on every message, regardless of the user’s query. They serve as authoritative reference material:- Each URL is fetched in parallel (10s timeout, 500KB limit per page)
- HTML is stripped to plaintext and truncated to ~4,000 characters
- Injected into the system prompt as
[pinnedN]references with priority instruction - Appear in citations alongside regular web search results
- Useful for grounding a chat to specific documentation, policies, or reference pages
How It Works
- Before each LLM call, the orchestrator checks if web search is enabled for the chat
- Web search runs against the configured provider with domain filters applied
- Pinned pages are fetched in parallel (independent of the search query)
- Results are formatted as
[webN]and[pinnedN]context blocks and injected into the message history - The LLM sees both document RAG results and web results, with instructions to cite sources inline
- Citations from web search and pinned pages are streamed to the client alongside document citations
Server-Side Default Merging
When a chat has web search enabled but no explicit provider selected:- The server reads
appSettings.defaultWebSearchProviderand applies it defaultWebSearchConfig(maxResults, includeAnswer) is merged — chat-level overrides take precedence- This happens in
ai.tsbefore the orchestrator is invoked