Search plugin
First-party search capability with one URL pipeline and two model-facing entries:
search— merged entry, visible when the current main model has no usable provider-native search.mode:"model"runs one isolated completion against the model referenced bydefaultCapabilities.searchwith native search enabled;mode:"url"fetches the given URLs and summarizes them with the current main model.search_url— URL-only entry, visible when the main model does have usable native search. It reads the URLs the model provides; discovery stays with the built-in search.
Only one entry is visible at a time. The host capability projection selects it
from getCapabilityFacts("search"); the plugin does not branch on vendor or
model names.
Configuration
settings.json may point the merged entry's model-search target at any registered
model that declares both text and search:
{
"defaultCapabilities": {
"search": "search-provider/search-model"
}
}
The target's provider search mode determines the actual vendor protocol. If no
target is configured, mode:"model" returns search_target_unavailable; URL
mode still works.
Bounds
- 32 URLs per call, 2048 characters per URL, 2000 characters per query.
- 8 MiB raw response per page, 128 MiB per call, 4 MiB extracted text per page.
- 512 KiB summary input, 16 KiB summary output, 8192 output tokens.
- 8 concurrent fetches, 20 s per URL, 120 s total fetch/model deadlines.
- System-level disk page cache (2 GiB / 5,000 entries / 5 MiB each; 14 days base, extended by hits) and a 32-entry / 10-minute in-memory summary cache. Pages contain content only; no URLs, headers, cookies or validators.
There are no domain, scope, or private-network restrictions in the plugin
itself. Deployments that need them should install a policy plugin before the tool
call. No provider credentials, cookies, or browser profiles are sent to target
URLs; pages with no readable server-rendered text fail with empty_content.
Status
mechanism-verified: deterministic unit tests cover registration, projection
metadata, both modes, input validation, partial failures, invalid summaries,
disk-cache persistence/retention/eviction, size/type failures, redirects, and
cancellation. Real-task benchmarking (P4 in
docs/design/搜索工具设计.md) remains a separate, authorized step.