- JavaScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| lib | ||
| vendor | ||
| .gitignore | ||
| index.js | ||
| package.json | ||
| README.md | ||
duh-websearch
Rotating web search tool for OpenCode. Chains native provider search → exa → parallel →
google_search, falling through tiers on failure. Every result carries metadata.provider
(e.g. native:zai, exa) so you always know who answered. Keyless exa/parallel MCP tiers
mean the tool works out of the box with no API keys.
Install
git clone <repo-url>
// opencode.jsonc → "plugin"
"plugin": ["file:<clone-dir>/duh-websearch"]
Restart opencode. No install, no build, no deps.
Options
// pin a tier: native | exa | parallel | google
["file:<clone-dir>/duh-websearch", { "provider": "native" }]
// custom duh-agy-auth location
["file:<clone-dir>/duh-websearch", { "googleSearchPath": "/path/to/duh-agy-auth" }]
Tiers
- z.ai —
web_search_primeMCP using the storedzai-coding-plankey orZAI_API_KEY - anthropic — provider API key, or Claude OAuth via the duh-claude-auth store
- chatgpt — OpenCode ChatGPT OAuth, codex backend (only native tier with TUI fallback warnings)
- exa / parallel — keyless hosted MCP, no key required
- google_search — sibling
duh-agy-authcloned side-by-side, orgoogleSearchPath
Raw openai API keys never attempt native; the tier skips silently to exa/parallel.
Placeholder keys (e.g. public) are treated as missing.
401/403 fall through to the next tier with a one-time-per-session TUI warning; 400 capability misses, 429/5xx, and network failures also fall through; missing credentials skip a tier silently (native skips warn once per session).
Tool args: query, allowed_domains, blocked_domains (mutually exclusive), numResults,
type, livecrawl, contextMaxCharacters, recency.