leeyoung1/dsh-web-search-opencode-go0

dsh-web-search-opencode-go

Fix DSH web_search through OpenCode Go / Zen: auto-inject x-opencode-session. Drop-in patched fork of @deepseek-ai/dsh-web-search-deepseek (DeepSeek Harness).

包名
dsh-web-search-opencode-go
版本
0.1.0
许可证
MIT
最近更新
2026年9月10日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:leeyoung1/dsh-web-search-opencode-go

Usage

1. Store the OpenCode Go API key in DSH

Open Settings → Models and store your OpenCode Go key under either:

  • DEEPSEEK_API_KEY (the provider default), or
  • OPENCODE_GO_API_KEY (then set apiKeyEnv: OPENCODE_GO_API_KEY in the config below).

The key is resolved on every search, so rotating it does not require a restart.

2. Point the built-in web search provider at OpenCode Go

In ~/.dsh/settings.yaml:

web-search-deepseek:
  baseURL: https://opencode.ai/zen/go/v1
  apiKeyEnv: DEEPSEEK_API_KEY   # default; OPENCODE_GO_API_KEY also works
  model: deepseek-v4-flash      # default

3. Install the patch and restart

Follow Quick start above, then restart dsh web.

4. Use it normally

There is no new command. Ask the agent in natural language:

搜索一下 DeepSeek Harness GitHub 的最新信息

or have it call the tool directly:

web_search: DeepSeek Harness GitHub

Expected: normal results; no MissingSessionID error. Each auxiliary search is recorded in the DSH session log as web/deepseek-search-llm-request.

Configuration

Your existing settings continue to work:

web-search-deepseek:
  baseURL: https://opencode.ai/zen/go/v1
  apiKeyEnv: DEEPSEEK_API_KEY   # default; OPENCODE_GO_API_KEY also works
  model: deepseek-v4-flash      # default

Optional new fields:

web-search-deepseek:
  baseURL: https://opencode.ai/zen/go/v1
  headers:
    x-opencode-client: dsh      # override any automatic header
  sessionId: my-fixed-session   # explicit OpenCode routing session

Header precedence:

  1. explicit headers['x-opencode-session']
  2. sessionId config
  3. current DSH agent session id
  4. provider-wide UUID fallback (programmatic calls outside an agent turn)

x-opencode-client defaults to dsh and can also be overridden.