Providing an agent with web connectivity in DeepSeek Harness (DSH) usually requires configuring a specific search provider. The dsh-web-search-glm plugin fills the gap for native web search using Zhipu GLM models. It executes search requests through GLM’s Anthropic-compatible interface and maps the results into a standard format that DSH can recognize.
What Is It¶
This is a plugin maintained by developer Noemm, designed to provide a GLM backend for DSH’s ctx.web interface. Instead of relying on crawlers, it directly calls GLM’s native web_search_prime tool.
Core Features¶
- Native Tool Execution: Executes the native
web_search_20250305server tool via the GLM endpoint. - Result Mapping: Maps
web_search_primeresult blocks returned by GLM into standardized search sources. - Content Parsing: Parses content into the
{url, title, snippet}format. - Deduplication: Automatically deduplicates results by URL.
- Signal Support: Supports full
AbortSignal. - Multiple Query Handling: Handles multiple search requests in a single response.
Installation and Enablement¶
Install the Plugin¶
Use the following command to add the plugin to the specified profile:
dsh plugin --profile <profile> add dsh-web-search-glm
Enable the Provider¶
DSH must explicitly select which search provider to use. The default dsh-base bundle may lock the official provider, so you need to override it through the profile’s patch layer.
Add or modify the following content in the cordis.patch.yml file for the target profile:
# ~/.dsh/profiles/<profile>/cordis.patch.yml
- id: web
config:
searchProvider: glm
Alternatively, set it directly in the startup environment variables:
export DSH_WEB_SEARCH_PROVIDER=glm
Configuration Notes¶
The plugin configuration items are located under the web-search-glm section in ~/.dsh/settings.yaml.
Basic Configuration Example¶
web-search-glm:
apiKeyEnv: ZAI_API_KEY
# baseURL: https://api.z.ai/api/anthropic/v1 # 海外部署地址
# model: glm-5.3-flash # 参考模型说明
Key Configuration Items¶
| Configuration Item | Default Value | Description |
|---|---|---|
apiKeyEnv |
ZAI_API_KEY |
Credential reference name. Keep it consistent with the zai provider if possible. |
apiKey |
— | Hard-coded API key (not recommended; use apiKeyEnv instead). |
baseURL |
https://open.bigmodel.cn/api/anthropic/v1 |
Anthropic-compatible endpoint URL. The plugin automatically appends /messages. |
model |
glm-5.3 |
Model name that performs native web search. |
apiVersion |
2023-06-01 |
Value for the anthropic-version request header. |
maxTokens |
4096 |
Token limit for message requests. |
maxUses |
5 |
Maximum number of web_search tool calls in a single request. |
Credential Resolution Chain¶
The plugin resolves credentials in the following order for each search:
1. The literal apiKey in the web-search-glm section.
2. The credential service referenced by apiKeyEnv.
3. The value of the environment variable named apiKeyEnv.
If none of these resolve successfully, the search returns a WEB_PROVIDER_CREDENTIAL_MISSING error.
Environment Variable Fallback¶
If baseURL is not set in the web-search-glm section, the plugin first checks the GLM_SEARCH_BASE_URL variable in the startup environment.
Model Notes¶
glm-5.3(default): Verified to work normally as of 2026-08-27. Supports Chinese and English queries and returns about 10 sources.glm-5.3-flash: Verified to work normally. Behaves likeglm-5.3and can be used as an alternative.glm-5-flash: The endpoint does not support this model. It returns a[1214][modelCode:不存在]error if used. Do not use it.
Notes and Use Cases¶
- Error Handling: If the response does not contain usable structured search results, or if the endpoint returns a non-2xx status code, the plugin returns
WEB_PROVIDER_ERROR. The error message is passed through as-is. - Query Validation: The endpoint (not the plugin configuration) does not reject nonsensical queries. It still performs the search and returns results.
- Billing: Search costs are charged to the GLM Coding Plan.
- Compatibility: Requires
dsh >= 0.1.1-rc.2. - License: MIT License.
Check the source code and license before installing. The plugin runs under the current DSH process permissions and is suitable for developers who need web retrieval using Zhipu GLM models.
Summary¶
After the configuration above, DSH can use GLM’s native web connectivity. The source code and documentation are available on GitHub.