FANXING-0710/dsh-web-search-opencode

FANXING-0710★ 1TypeScriptLast synced: 2026-08-15

Open on GitHub

为了解决使用opencode go接入deepseek harness会无法搜索,而诞生的插件。将deepseek harness的搜索逻辑改为opencode。

README excerpt

dsh-web-search-opencode 为 DeepSeek Harness( dsh )的 ctx.web 搜索能力缝提供 OpenCode 同款搜索 的 provider 插件:让使用 opencode-go key 驱动 deepseek-v4-flash 等模型的会话, web search 工具可以直接可用,不需要 DeepSeek 官方 API key。 原理 opencode 的 web 搜索 不经过 opencode-go 服务器 ( opencode.ai/zen/go/v1 只有 chat/completions、messages、models、responses、usage 五个端点,没有搜索端点),而是客户端直连第三方 MCP 端点(见 sst/opencode 的 tool/websearch.ts + tool/mcp-websearch.ts ): 后端 端点 工具名 Exa https://mcp.exa.ai/mcp web search exa Parallel https://search.parallel.ai/mcp web search 请求为 JSON-RPC 2.0 tools/call ,25 秒超时,响应是直接 JSON 或 SSE( data: 前缀行)。本插件完全复刻这套行为,注册进 DSH 的 ctx.web 缝: DSH 默认的 web-search-deepseek provider 需要 DEEPSEEK API KEY (DeepSeek 官方 API,走 Anthropic 兼容端点的 web search 20250305 服务端工具),只有 opencode-go key 时不可用(报 WEB PROVIDER CONFIGURED UNAVAILABLE )。本插件的 available() 恒为 true(两个 MCP 端点免 key),并覆盖 web 行的 searchProvider 指向它。 安装 装完 重启 dsh web 生效(正在运行的实例是启动时加载插件树的)。 配置 默认无需任何配置。可选配置项(在 profile 的 cordis.patch.yml 覆盖 web-search-opencode 行的 config ,或设置环境变量): 配置项 环境变量 默认值 说明 provider OPENCODE WEBSEARCH PROVIDER auto auto (按查询确定性 50/50)\ exa \ parallel exaApiKey EXA API KEY 空 附加为 ?exaApiKey= 查询参数(同 opencode) parallelApiKey PARALLEL API KEY 空 附加为 Authorization: Bearer num…

View full README on GitHub →
Searchdsh-pluginsearch

Category