dsh-host-kimi-search
中文 | English
DeepSeek Harness (DSH) host plugin: zero-config web search via Kimi Coding.
Registers a kimi-coding search provider on ctx.web that POSTs the built-in web_search tool's requests to https://api.kimi.com/coding/v1/search. Credentials reuse the same key as your local kimi-coding model provider — anyone with a Kimi Coding plan can install it and go, no extra setup.
How it works
- Credentials are resolved fresh on every search, in this order:
1. DSH credential service (startup env → persistent store ~/.dsh/.credentials.yaml): KIMI_CODING_API_KEY → DEEPSEEK_API_KEY → KIMI_API_KEY 2. File fallback: api_key from ~/.kimi-code/config.toml or ~/.kimi/config.toml
search_resultsfrom the response are mapped to standard sources (url / title / snippet / publishedAt), honoringmaxResultstruncation with atruncatedflag- 401 and network errors are thrown with explicit messages for easy diagnosis
- Hardening (v0.2.0): result URLs are restricted to
http(s)(a compromised endpoint cannot injectjavascript:/data:links into rendered results); response bodies over 5 MB are rejected before parsing (no unbounded reads); unsignaled calls fall back to a 60s timeout
Install
dsh plugin --profile web add dsh-host-kimi-searchRestart dsh web after installing (the plugin entry and the provider both mount at startup).
The bundled patch does two things on install:
1. Inserts the kimi-search plugin entry (registers the provider); 2. Sets the web plugin's searchProvider to kimi-coding (i.e. it takes over the built-in web_search immediately after install — no manual config needed).
> To switch back to official search: edit ~/.dsh/profiles/web/cordis.patch.yml and add a user-layer override (user layer wins over plugin layer): > > ``yaml > - id: web > config: > searchProvider: deepseek-official > ``
Configuration
| Env var | Purpose |
|---|---|
KIMI_CODING_API_KEY / DEEPSEEK_API_KEY / KIMI_API_KEY | Credential sources (highest priority first) |
KIMI_SEARCH_BASE_URL | Override the search endpoint (for gateway compatibility; default https://api.kimi.com/coding/v1/search) |
Files
| File | Purpose |
|---|---|
package.json | Package manifest with the dsh.bundle declaration |
index.js | All host-side logic (apply(ctx) registers the provider, inject: ['web']) |
cordis.patch.yml | Bundle patch: inserts the plugin entry + switches searchProvider |
Compatibility: tested against @deepseek-ai/dsh 0.1.0-rc.6. No third-party runtime dependencies (Node stdlib + global fetch only).
License
MIT