Preface¶
DeepSeek Harness (DSH) host plugins extend capabilities by injecting code at runtime. When developers need to integrate Kimi Coding’s web search functionality into an agent, they typically have to manually handle API key and endpoint configuration. The dsh-host-kimi-search plugin registers a provider with ctx.web, forwards requests from the built-in web_search tool to https://api.kimi.com/coding/v1/search, and reuses locally configured credentials to achieve zero-configuration access.
What Is This¶
This is a host plugin for enabling Kimi Coding search capabilities in a DSH environment. It does not introduce additional runtime dependencies and interacts externally only through Node standard libraries and global fetch. After installation, it automatically sets the searchProvider of the web plugin to kimi-coding.
Installation and Setup¶
- Install it using the official command:
dsh plugin --profile web add dsh-host-kimi-search
- Restart
dsh webafter installation for the configuration to take effect.
How It Works¶
When the plugin starts, it resolves credentials in the following priority order:
1. Environment variables: KIMI_CODING_API_KEY > DEEPSEEK_API_KEY > KIMI_API_KEY
2. File fallback: ~/.kimi-code/config.toml, ~/.kimi/config.toml
Search requests are POSTed to https://api.kimi.com/coding/v1/search. The search_results in the response are mapped to the standard sources format, including the url, title, snippet, and publishedAt fields.
Security and Compatibility¶
The plugin includes security hardening measures:
- URLs are allowed only for http and https.
- Response bodies larger than 5MB are rejected.
- Request timeout is set to 60 seconds.
The only dependency is the Node standard library, compatible with @deepseek-ai/dsh 0.1.0-rc.6.
Switching Back to Official Search¶
If you need to switch back to DeepSeek official search, edit ~/.dsh/profiles/web/cordis.patch.yml and add the following configuration:
- id: web
config:
searchProvider: deepseek-official