websearch
Configure web search for agents. Crabcode supports two complementary paths:
- Local adapters (
websearch.provider) — crabcode runs awebsearchtool against Exa, Tavily, Brave, Ollama Cloud, etc. - Native tools (
websearch.native) — the active LLM provider executes search server-side (web_search,x_search, …). These are normal aisdk tools composed into the tools list.
{
"websearch": {
"enabled": true,
"provider": "exa-hosted-mcp",
"apiKey": null,
"endpoint": null,
"native": {
"web": false,
"x": true
}
}
}websearch: false (or "enabled": false) disables both local and native search.
Local vs native
native.web and the local websearch tool are substitutes: when native.web is on and the active provider supports hosted web search, local websearch is skipped.
native.x is a complement: just to make crabcode as capable as grok-build cli.
// Local Ollama Cloud web search + xAI x_search
{
"websearch": {
"provider": "ollama-cloud",
"apiKey": "{env:OLLAMA_API_KEY}",
"native": {
"web": false,
"x": true
}
}
}Defaults
Unsupported native flags are ignored (e.g. native.x on OpenAI). If native.web is true but the active provider has no hosted web tool (Ollama, Groq, …), crabcode falls back to the local adapter.
Native tool costs
These fees apply on API-key auth. Models often invoke search multiple times per turn.
Subscription / OAuth logins (ChatGPT, Claude, SuperGrok, …) use the provider’s subscription transport instead — native search is included in plan quota / rate limits, not billed as the API tool fees above.
Local adapters bill (or rate-limit) through their own APIs — exa-hosted-mcp and firecrawl-hosted-mcp are keyless/rate-limited; Exa/Tavily/Brave/Ollama Cloud/etc. use your key.
Default is local websearch + native.x on xAI. Set native.web: true to use provider-hosted web search instead (API tool fees may apply).