jitang-open/dsh-web-search-ocgo ↗★ 0
dsh-web-search-ocgo
自研 DSH 网页搜索 provider:走 OpenCode Go(自动注入 x-opencode-session),带官方端点失败回退、查询缓存、result.content 总结与日期规范化,并自带设置页。 适合需要网页搜索、端点回退和查询缓存的DSH用户。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:jitang-open/dsh-web-search-ocgoREADME
Read the full README ↗配置
图形界面
「设置 → 插件」→ 打开 dsh-web-search-ocgo → 配置页。
改动在失焦或回车时立即保存,写入 profile 的 cordis.patch.yml。
YAML
也可以在 ~/.dsh/profiles/web/cordis.patch.yml 里写:
- id: web-search-ocgo
name: dsh-web-search-ocgo
config:
apiKeyEnv: OPENCODE_API_KEY
baseURL: https://opencode.ai/zen/go/v1
model: deepseek-v4.1-flash
fallbackEnabled: true
cacheTtlMs: 300000
answerMaxChars: 2000
所有字段都有 schema 默认值,写多少覆盖多少。
主要配置项
| 字段 | 默认值 | 说明 |
|---|---|---|
apiKeyEnv | OPENCODE_API_KEY | 凭据中心里的密钥名 |
baseURL | https://opencode.ai/zen/go/v1 | Go 端点(不含 /messages) |
model | deepseek-v4.1-flash | Go 端点只认 deepseek-v4-flash / deepseek-v4.1-flash |
maxUses | 5 | 实测对成本无影响,不建议下调 |
sessionId | 空(每次启动随机) | 固定会话 id;实测缓存命中不依赖它 |
fallbackEnabled | true | Go 失败后回退官方端点(消耗 DeepSeek 余额) |
fallbackModel | deepseek-flash | 官方端点只认 deepseek-flash / deepseek-v4-pro |
cacheEnabled / cacheTtlMs / cacheMaxEntries | true / 300000 / 50 | 查询缓存 |
answerMaxChars | 2000 | result.content 截断;0 = 不返回 |
snippetMaxChars | 300 | 单条摘要截断 |
retryCount | 1 | 429 / 5xx / 网络错误的重试次数 |
主要配置项
| 字段 | 默认值 | 说明 |
|---|---|---|
apiKeyEnv | OPENCODE_API_KEY | 凭据中心里的密钥名 |
baseURL | https://opencode.ai/zen/go/v1 | Go 端点(不含 /messages) |
model | deepseek-v4.1-flash | Go 端点只认 deepseek-v4-flash / deepseek-v4.1-flash |
maxUses | 5 | 实测对成本无影响,不建议下调 |
sessionId | 空(每次启动随机) | 固定会话 id;实测缓存命中不依赖它 |
fallbackEnabled | true | Go 失败后回退官方端点(消耗 DeepSeek 余额) |
fallbackModel | deepseek-flash | 官方端点只认 deepseek-flash / deepseek-v4-pro |
cacheEnabled / cacheTtlMs / cacheMaxEntries | true / 300000 / 50 | 查询缓存 |
answerMaxChars | 2000 | result.content 截断;0 = 不返回 |
snippetMaxChars | 300 | 单条摘要截断 |
retryCount | 1 | 429 / 5xx / 网络错误的重试次数 |