jitang-open/dsh-web-search-ocgo ↗★ 0

dsh-web-search-ocgo

自研 DSH 网页搜索 provider:走 OpenCode Go(自动注入 x-opencode-session),带官方端点失败回退、查询缓存、result.content 总结与日期规范化,并自带设置页。 适合需要网页搜索、端点回退和查询缓存的DSH用户。

Package
dsh-web-search-ocgo
Compatibility
Unverified
Version
0.1.0
License
MIT
Last updated
Oct 1, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:jitang-open/dsh-web-search-ocgo

配置

图形界面

「设置 → 插件」→ 打开 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 默认值,写多少覆盖多少。

主要配置项

字段默认值说明
apiKeyEnvOPENCODE_API_KEY凭据中心里的密钥名
baseURLhttps://opencode.ai/zen/go/v1Go 端点(不含 /messages)
modeldeepseek-v4.1-flashGo 端点只认 deepseek-v4-flash / deepseek-v4.1-flash
maxUses5实测对成本无影响,不建议下调
sessionId空(每次启动随机)固定会话 id;实测缓存命中不依赖它
fallbackEnabledtrueGo 失败后回退官方端点(消耗 DeepSeek 余额)
fallbackModeldeepseek-flash官方端点只认 deepseek-flash / deepseek-v4-pro
cacheEnabled / cacheTtlMs / cacheMaxEntriestrue / 300000 / 50查询缓存
answerMaxChars2000result.content 截断;0 = 不返回
snippetMaxChars300单条摘要截断
retryCount1429 / 5xx / 网络错误的重试次数

主要配置项

字段默认值说明
apiKeyEnvOPENCODE_API_KEY凭据中心里的密钥名
baseURLhttps://opencode.ai/zen/go/v1Go 端点(不含 /messages)
modeldeepseek-v4.1-flashGo 端点只认 deepseek-v4-flash / deepseek-v4.1-flash
maxUses5实测对成本无影响,不建议下调
sessionId空(每次启动随机)固定会话 id;实测缓存命中不依赖它
fallbackEnabledtrueGo 失败后回退官方端点(消耗 DeepSeek 余额)
fallbackModeldeepseek-flash官方端点只认 deepseek-flash / deepseek-v4-pro
cacheEnabled / cacheTtlMs / cacheMaxEntriestrue / 300000 / 50查询缓存
answerMaxChars2000result.content 截断;0 = 不返回
snippetMaxChars300单条摘要截断
retryCount1429 / 5xx / 网络错误的重试次数