Foreword¶
When building web-connected agents in DeepSeek Harness (DSH), a web search provider is usually attached. The official dsh-web-search-deepseek routes through api.deepseek.com/anthropic/v1 and can search, but in real testing the summary coverage rate of result.content is 0%, and it also lacks query caching and fallback to the Go endpoint after failure. Someone in the community once forked dsh-web-search-opencode-go to redirect requests to OpenCode Go; on DSH 0.1.7-rc.2, it either crashes immediately on load due to statically importing a non-existent installSettingsSection, or only barely runs by relying on a symlink in the profile pointing to an older dsh.
dsh-web-search-ocgo, maintained by jitang-open, is a rewrite from scratch that preserves external behavioral compatibility: it routes through OpenCode Go (automatically injecting x-opencode-session), and adds fallback to the official endpoint on failure, query caching, summarization of result.content, and a built-in settings page. Below is an introduction to what it is, what it can do, and how to mount it into a web profile.
What This Is¶
- Repository: jitang-open/dsh-web-search-ocgo
- Category: Web-connected tool (SkillHub directory: dsh-web-search-ocgo)
- Positioning: DSH web search provider, with
provider idofopencode-goandloader entry idofweb-search-ocgo - Dependency surface: It only imports one external package,
@deepseek-ai/schemastery; everything else is obtained viactx.get(), avoiding version mismatch issues where the plugin directory cannot resolve@deepseek-ai/dsh-*packages
Compared with the official dsh-web-search-deepseek, the endpoint is changed to https://opencode.ai/zen/go/v1, and only the models deepseek-v4-flash / deepseek-v4.1-flash are accepted; it also automatically injects x-opencode-session and x-opencode-client.
Core Features¶
Endpoint and Session Headers¶
The default baseURL is https://opencode.ai/zen/go/v1 (without /messages), and the default model is deepseek-v4.1-flash. Credentials are read from the DSH credential center via the config option apiKeyEnv (default OPENCODE_API_KEY).
result.content and Result Quality¶
The official provider does not fill in result.content; this plugin takes the model summary from the response text block and writes it into result.content, truncated to 2000 characters by default (answerMaxChars; set to 0 to return nothing). A single snippet is truncated to 300 characters by default (snippetMaxChars). page_age is normalized to ISO-8601; if parsing fails, it is discarded rather than stuffed with a fake date.
Query Caching¶
Enabled by default: TTL of 5 minutes (cacheTtlMs: 300000), LRU capacity of up to 50 entries (cacheMaxEntries: 50). When the cache hits, token consumption is 0. Real measurements of 32 requests in the README show that lowering maxUses has almost no impact on total prompt and number of result entries (only 1 actual web_search is issued each time); to save quota you should rely on caching rather than changing maxUses (still defaults to 5).
Failure Fallback and Retry¶
After retries on the Go endpoint are exhausted, it can fall back to the official endpoint (fallbackEnabled defaults to true, the fallback model defaults to deepseek-flash, which will consume DeepSeek balance). There are backoff retries for 429, 5xx, and network errors (retryCount defaults to 1).
Settings Page¶
Web profile: “Settings → Plugins” → dsh-web-search-ocgo; changes are written to the profile’s cordis.patch.yml on blur or Enter. Under dsh-tui, a TUI settings section is registered (about 19 fields, 7 groups). Response statistics go through logger.info, and no custom session events are written, to avoid the history log being unable to load due to unknown event types.
Diagnostics and Development Scripts¶
The repository provides node scripts/check.mjs, node --test test/*.test.js, node bin/doctor.mjs (which can really send a search with --probe), as well as bench scripts; the current package version is 0.2.0, license MIT, and the Node requirement is ^22.19.0 || >=24.0.0.
Installation and Activation¶
The README does not provide a dsh plugin add style command; after cloning or downloading the source locally, you need to mount it into the profile using a symbolic link. The following steps are excerpted from the repository instructions (replace the example paths in the README with the actual directories on your machine).
1. Prepare the schemastery link¶
Let the plugin directory resolve its only external dependency:
ln -sfn ~/.dsh/profiles/web/node_modules/@deepseek-ai/schemastery \
node_modules/@deepseek-ai/schemastery
Run this in the root directory of the plugin source; if node_modules/@deepseek-ai does not exist, you need to create it first.
2. Mount into the web profile¶
ln -sfn "$PWD" ~/.dsh/profiles/web/node_modules/dsh-web-search-ocgo
3. Register the bundle¶
Edit ~/.dsh/profiles/web/package.json: add dsh-web-search-ocgo to dsh.profile.bundles, and add a link pointing to the absolute path on your machine to dependencies, for example:
"dsh-web-search-ocgo": "link:/your/path/dsh-web-search-ocgo"
4. Clean up the old fork (if you ever used it)¶
Remove the old web-search-opencode-go section from ~/.dsh/profiles/web/cordis.patch.yml, and remove dsh-web-search-opencode-go from dsh.profile.bundles.
5. Restart and verify¶
dsh web
The log should show something like:
[web-search-ocgo] Loaded provider id=opencode-go endpoint=https://opencode.ai/zen/go/v1 model=deepseek-v4.1-flash fallback=deepseek-flash
Further checks:
dsh --profile web --dump-config | grep -A5 "id: web$" # searchProvider should be opencode-go
node scripts/check.mjs
node --test test/*.test.js
node bin/doctor.mjs
Typical Configuration¶
Graphical Interface¶
Web: “Settings → Plugins” → dsh-web-search-ocgo. TUI: find the web-search-ocgo group in /settings (endpoint and model, credentials, OpenCode Go session headers, failure fallback, query caching, result quality, reliability).
YAML Snippet¶
You can override the default values in ~/.dsh/profiles/web/cordis.patch.yml, for example:
- 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
Commonly used fields: sessionId (random on each start if empty), fallbackModel (default deepseek-flash), cacheEnabled / cacheMaxEntries, retryCount.
Use Cases and Notes¶
Who it is for: Users who are already using or planning to use OpenCode Go for web search, need result.content summaries, want the official endpoint as a fallback when Go is down, and want to use caching to reduce the cost of duplicate queries.
Temporary rollback: In “Settings → Plugins”, change the searchProvider of web back to deepseek-official and restart; no need to uninstall this plugin.
Security and permissions: The plugin runs under the DSH process permissions, and it reads credentials and sends requests to external networks. Before installing, you should read the GitHub source and the MIT license, and confirm that the apiKeyEnv and endpoint configuration comply with your compliance requirements. SkillHub is a community directory and has no official affiliation with DeepSeek / High-Flyer.
Complete uninstall: Remove it from the bundles and dependencies in package.json, delete the web-search-ocgo section in cordis.patch.yml and change searchProvider back to the official one, delete the symlink under node_modules, then restart dsh web.
Closing¶
dsh-web-search-ocgo connects DSH web search to OpenCode Go, and adds summarization, caching, fallback, and dual-side settings pages beyond the official capabilities, while compressing dependencies to schemastery, reducing the load risk during dsh upgrades. Directory page: SkillHub; source code and complete documentation: GitHub README.