Feature request
The built-in websearch tool supports exactly two backends — exa and parallel — hardcoded in WebSearchProviderSchema in tool/websearch.ts. Synthetic (synthetic.new) provides a zero-data-retention web search API (POST https://api.synthetic.new/v2/search, returns {results: [{url, title, text, published}]}) explicitly designed for coding agents, but there is no way to route opencode's websearch tool to it.
Proposed behavior
Add "synthetic" as a third web search provider:
WebSearchProviderSchema gains "synthetic", selectWebSearchProvider handles it (env override + flag + checksum fallback)
callProvider POSTs to https://api.synthetic.new/v2/search with Bearer auth and formats results (url/title/text)
- Auto-enabled when the synthetic provider is authed (auth store) or
SYNTHETIC_API_KEY env is set, or explicitly via OPENCODE_ENABLE_SYNTHETIC_SEARCH=1
Why
- Web search is decoupled from LLM provider auth today — the tool never looks at which provider is authed, so a user with a Synthetic key can't use Synthetic's search without a plugin.
- Synthetic's search is zero-data-retention, which is a meaningful privacy property for coding-agent search.
- The
callProvider() switch is the intended extension point — this is a clean third case following the exa/parallel pattern.
Feature request
The built-in
websearchtool supports exactly two backends —exaandparallel— hardcoded inWebSearchProviderSchemaintool/websearch.ts. Synthetic (synthetic.new) provides a zero-data-retention web search API (POST https://api.synthetic.new/v2/search, returns{results: [{url, title, text, published}]}) explicitly designed for coding agents, but there is no way to route opencode's websearch tool to it.Proposed behavior
Add
"synthetic"as a third web search provider:WebSearchProviderSchemagains"synthetic",selectWebSearchProviderhandles it (env override + flag + checksum fallback)callProviderPOSTs tohttps://api.synthetic.new/v2/searchwith Bearer auth and formats results (url/title/text)SYNTHETIC_API_KEYenv is set, or explicitly viaOPENCODE_ENABLE_SYNTHETIC_SEARCH=1Why
callProvider()switch is the intended extension point — this is a clean third case following the exa/parallel pattern.