DeepSeek Harness Plugin: Search and Visual Recognition with a Z.AI (GLM) Account

DeepSeek Harness comes with built-in web_search and web_fetch backends that require you to apply for separate API keys with associated billing. Users who already have a Z.AI (GLM) subscription often want to reuse their existing allowances. This plugin connects Harness’s web search, reading, and vision capabilities to the Z.AI backend via OAuth login, eliminating the need to manage additional API keys.

Core Features

The plugin primarily addresses backend integration for web retrieval and content fetching, and it provides status monitoring.

  • Web Search: Replaces Harness’s web_search tool with Z.AI’s web_search_prime.
  • Web Reader: Replaces the web_fetch tool with Z.AI’s webReader.
  • Vision Capability: Registers the zai_vision tool for image description, OCR, and visual Q&A.
  • Status Monitoring: Offers a /dsh-glm-status command that displays token age, plan expiration time, and remaining quota.
  • Zero Dependencies: The code relies on no external libraries—there are no node_modules, dependencies, or peerDependencies.

Installation & Activation

Install via the command line or a plugin manager. After installation, restart Harness for the changes to take effect.

Command Line Install:

dsh plugin --profile desktop add dsh-glm-web-search

Plugin Manager Install:

  1. Open Plugins → Add plugin.
  2. Enter dsh-glm-web-search.
  3. Ensure the install source is npm (or the npmmirror for mainland China).
  4. Restart Harness after installation completes.

Usage

Once installed and logged in, you don’t need to modify existing tool-call logic—the plugin will take over automatically.

Login & Logout:

/dsh-glm-web-search login     # Opens a browser for OAuth authorization
/dsh-glm-web-search logout    # Clears local credentials

The above commands support short aliases:

/dsh-glm-login
/dsh-glm-logout

View Status:

/dsh-glm-status

This command shows token validity, plan details, and quota usage for GLM-5.3 and GLM-5.3-Flash.

Configuration & Limitations

The plugin supports several configuration options; the defaults usually meet basic needs.

Configuration Fields:

Field Default Value Description
origin https://zcode.z.ai Gateway URL
model unset Model used for search and fetch operations
appVersion probed Client version reported to the gateway
jwtEnv ZAI_JWT Environment variable reference for credentials
tokenPath $DSH_HOME/dsh-glm-web-search/token.json Local token file path
vision true Whether to register the zai_vision tool
timeoutMs 90000 Request timeout in milliseconds

Known Limitations:

  • Search Result Cap: The upstream Z.AI returns up to 10 results; the DSH tool layer truncates this to 8 (setting truncated: true).
  • Free Account Restrictions: Free Z.AI accounts can be used for search and fetching; vision features require Flash model support.
  • Credential Storage: Credentials are stored in the local file $DSH_HOME/dsh-glm-web-search/token.json; upgrading the plugin will not cause credential loss.

When to Use

If you already hold a Z.AI subscription and want to use web and vision features without adding to your DeepSeek Harness bill, this plugin is a straightforward choice. Thanks to its zero-dependency design, it has minimal system requirements.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye