Introduction

The core idea of DeepSeek Harness (DSH) is ”everything is a plugin.” When developing agents, integrating Zhipu’s GLM series models requires handling details such as dual endpoints (Coding Plan and the regular API), reasoning tier mapping, and local API key management. This plugin registers the Zhipu BigModel/GLM family as a model provider route and covers the above scenarios.

Plugin Scope

zn-dk/dsh-zhipu-toolkit is a toolkit that provides Zhipu BigModel/GLM services for DeepSeek Harness. It supports dual-endpoint model catalogs (Coding Plan + regular API), validated reasoning tier mapping, real-time model discovery, and a Web settings card, aiming to reduce the configuration and operational complexity of integrating GLM models.

Core Features

The plugin provides the following core capabilities:

  1. Endpoint Selection: Switch between the Coding Plan endpoint (zai) and the regular OpenAPI endpoint (zhipu). Both use the same model list and request semantics, with the only difference being the billing method.
  2. Self-Maintained Catalog: Provides a complete catalog of the GLM chat family (from GLM-4.5 to GLM-5.3-Flash), including validated context windows and output limits.
  3. Native Multimodality: Supports the native multimodal capability of glm-5.3-flash (image input is enabled).
  4. Usage and Quota: Provides deep links to the official console for viewing usage and limits.
  5. Reasoning Tier Validation: Validates thinking semantics for the GLM-5.3 series models to ensure correct request formats.
  6. Real-Time Model Discovery: Polls the endpoint /models after startup and after settings changes to dynamically update the available model list.
  7. Local API Key: Supports holding the key locally in the Web settings card instead of relying only on environment variables.
  8. Web Settings Card: Provides a visual Web GUI for configuration.
  9. Bilingual UI: The interface follows the host language service (zh-CN / en).

Installation and Activation

Install the plugin using the official command line:

dsh plugin --profile web add dsh-zhipu-toolkit

If you need to install a packaged local file during development, you can run:

npm pack
dsh plugin --profile web add ./dsh-zhipu-toolkit-<version>.tgz

After installation, you must restart dsh web. DSH assembles the client package and host plugin tree at startup, so changes only take effect after a restart.

Configuration and Usage

The plugin uses zhipu-toolkit as the settings namespace.

Configuration Options

Configure the following key fields in ~/.dsh/settings.yaml:

zhipu-toolkit:
  endpoints: coding         # coding | paas (二选一)
  codingApiKeyEnv: BIGMODEL_API_KEY
  paasApiKeyEnv: ZHIPU_API_KEY
  displayName: BigModel
  defaultReasoningTier: low # low | medium | high | xhigh | max
  useLocalApiKey: false     # true = 在卡片上持有密钥

API Key Configuration

Two methods are available for key storage:

  1. Environment Variable Reference (Default): Store an environment variable reference through the credentials service, for example:
    dsh credentials set BIGMODEL_API_KEY
  1. Local Key (Web Card): Enable useLocalApiKey in the Web settings card and paste the key into the password field. The key is stored in the DSH credential store (key is ZHIPU_TOOLKIT_API_KEY), displayed as a masked summary, and supports immediate editing or clearing.

Typical Usage

  1. Install the plugin and restart dsh web.
  2. Set the environment variable key using dsh credentials set BIGMODEL_API_KEY, or configure a local key in the Web settings card.
  3. Select the corresponding GLM model in the model selector (e.g., glm-5.3-flash).
  4. Set reasoning_effort in the request (defaults to low).

Notes

  1. Restart Requirement: After installing the plugin, you must restart dsh web. Changes to plugin routing are re-resolved after commit/write, so no restart is required for those changes.
  2. Reasoning Tier Limitation: GLM-5.3 series models cannot disable thinking. The API rejects thinking: disabled (error code 1210). The plugin has removed off and minimal from the selector and maps low/medium/high to high, and xhigh/max to max.
  3. Model Discovery Mechanism: The model selector filters models in real time based on the endpoint’s /models report. If the endpoint stops providing a model, that model disappears from the selector. Only directly validated models (e.g., glm-5.3) can tolerate endpoint delays.
  4. Read-Only State: If the deployed settings document is read-only (for example, a managed configuration), the Web settings card may appear read-only. In that case, edit the orchestration entry rather than the card directly.

Conclusion

This plugin provides DSH users with a standardized integration solution for Zhipu models, addressing the pain points of dual-endpoint switching, thinking semantics adaptation, and multimodal support. More details and source code can be found in its GitHub repository.