Preface

DeepSeek Harness (dsh) is an open-source agent runtime developed by DeepSeek, which the official repository summarizes in one sentence: Everything is a plugin. Model adapters, tools, sessions, sandboxes, and web interfaces can all be added or removed at the configuration layer without modifying the core source code. The project is currently in developer preview, and its interfaces will continue to change. Independent plugin directory sites have emerged in the community, aggregating GitHub repositories tagged with dsh-plugin. It should be noted that these directories have no official affiliation with DeepSeek / Fangjia and should not be treated as an official app store.

Many users can already run agents locally with dsh web, typically using the official DeepSeek API for model access. Another option is Deepseek-v4-flash provided by the WeChat Mini Program “Coding Plan”, whose gateway is at chatapi.weixin.qq.com and claims to be OpenAI-compatible on the surface. Using the official dsh-llm-deepseek adapter directly against this gateway will encounter three issues:
1. The thinking content is not stored in reasoning_content, but the entire segment including <think> / </think> is stuffed into content;
2. Subsequent tool call deltas will explicitly send id: null / name: null, overwriting the correct values from the first fragment;
3. DSH places tool results in tool-result blocks, which need to be expanded into role: tool messages when sending to the gateway.

The native parser cannot handle these differences: thinking content fails to enter the thinking block, tags remain in the main text, and tool calls become unstable.

dsh-llm-wechat addresses these specific pain points: it reuses the official DeepSeekAdapter and only adds a streaming translation layer on the response side, allowing DSH to treat this WeChat gateway as the official DeepSeek service. It does not connect the WeChat chat window to the Harness robot channel — do not confuse this plugin with a separate group of WeChat bridges using iLink / QR code login in the community.

This article is collated after cross-checking against the community directory details page, GitHub repository README, package.json, cordis.patch.yml, lib/index.js, lib/wechat-translate.js, and the official deepseek-ai/deepseek-harness repository.

What is this

dsh-llm-wechat is an LLM adapter plugin for DeepSeek Harness, maintained by sulfide2085, with its GitHub repository at sulfide2085/dsh-llm-wechat. The community directory categorizes it under “Notifications & Integrations”, and its primary language is JavaScript. As of 2026-08-18, both the directory page and GitHub show 6 stars. The version in package.json is 0.1.0-rc.6, the package name is @deepseek-ai/dsh-llm-wechat, and the license is declared as MIT. There is currently no separate LICENSE file in the repository root, so the GitHub license field is empty. You should still review the source code yourself before installation.

The README states that this is a public repository split and independently maintained from the original project, with its source code located in the dsh-llm-wechat directory. Its registered provider route is wechat, and it defaults to connecting to https://chatapi.weixin.qq.com/openai/v1. The model list defaults to only one entry: Deepseek-v4-flash (displayed as WeChat Deepseek-V4-Flash in the UI). Request serialization, error mapping, model parsing, and retry strategies all inherit from the DeepSeekAdapter of the official dsh-llm-deepseek, without modifying any DSH / pi-ai source code.

The problem it solves can be summed up in one sentence: allowing DSH to convert the stream from the WeChat Coding Plan gateway into a standard format recognizable by the upper layer — so that thinking content goes into the thinking block, tool calls work normally, and no tags remain in the main text.

Core Features

The repository README and source code clearly define the capability boundaries. Only the verified parts are listed below:

  1. Streaming think tag translation. When thinking is enabled, the WeChat gateway places the entire “thinking content + final answer” into delta.content, with thinking content first followed by the answer, separated by </think>, and may also include an explicit <think> opening tag. The plugin inserts the ThinkTagSplitter state machine between parseSse and translate: rearranges the text before the closing tag into reasoning_content, and leaves the rest for content. A commit on 2026-08-16 changed the splitting to incremental output, only retaining a small tail of tag length to identify tags split across chunks, no longer buffering the entire segment until </think> is received. If the thinking block is not closed when the stream ends, flush() is used as a fallback. stripThinkingTags is enabled by default; when thinking is disabled or not stripped, the interceptor does not parse JSON and passes through the raw data.

  2. Prevent tool call fields from being overwritten by null. Subsequent WeChat deltas will explicitly send id: null / name: null. The WechatAdapter only accepts non-empty strings to update id/name, avoiding overwriting the correct values already obtained from the first delta.

  3. Expand tool results to full official format. DSH places tool results in tool-result blocks, which are expanded into independent role: tool messages during serialization. Empty results are fallback to (no output) to prevent the gateway from ignoring empty content.

  4. Add strict constraints only for the wechat channel. After seeing the SDK tool declaration in the system prompt, the WeChat model occasionally directly calls collapsed tools such as glob / pwsh, triggering unknown tool. The plugin appends a TOOL USAGE RULE at the end of the system prompt: do not call tools directly except for run_code, and must write the call into run_code and then await tools.name(...). This only applies to the wechat channel and does not affect other providers. The README also notes that this only mitigates the issue and cannot eliminate it 100%.

  5. Out-of-the-box reasoning effort levels. The WeChat gateway only recognizes off / high / max. The plugin’s resolveModel unconditionally returns these three levels, with high as the default. The model selector will show WeChat → Deepseek-V4-Flash, along with a reasoning effort dropdown. Passing other values will trigger UNSUPPORTED_REASONING_EFFORT before the request is sent. thinking: disabled will lock the off level.

  6. Request-level deadline for gateway timeouts. The WeChat single request has a hard timeout of approximately 60 seconds. The plugin defaults requestTimeoutMs to 55 seconds, failing quickly with TIMEOUT and handing over to the retry strategy, avoiding half-open connections occupying concurrency slots indefinitely, where the idle watchdog would take up to the default 5 minutes to release.

Installation and Activation

The installation command provided by the community directory details page, to be run in the DeepSeek Harness terminal:

dsh plugin add github:sulfide2085/dsh-llm-wechat

The plugin runs with the permissions of the current dsh process, and may execute code during installation. Please review the source code repository and license before installation. For reproducible installations, the directory page recommends pinning the commit hash:

dsh plugin add github:sulfide2085/dsh-llm-wechat#commit

Replace #commit with the actual commit hash. On the day this article was verified, the latest commit on the repository’s master branch was 03e2107bfc3d48a517b516934c973fdc3aa4392b (2026-08-16).

The repository README also mentions local directory installation, suitable for cases where you have cloned the source code and specified a web profile:

dsh plugin --profile web add ./dsh-llm-wechat

dsh plugin add will install the package as a link: into the profile, and append the patch layer (cordis.patch.yml) declared in dsh.bundle to dsh.profile.bundles, without requiring manual file edits. The npm installation command in the README (dsh plugin --profile web add @deepseek-ai/dsh-llm-wechat) is marked as “pending release”, do not install it as a published package for now.

After installation, you need to prepare a Token. The README requires writing the WeChat Coding Plan API Token to $DSH_HOME/.credentials.yaml, or you can export the同名 environment variable at startup:

WECHAT_API_KEY: <API Token for WeChat Coding Plan>

Then add an llm-wechat: section in $DSH_HOME/settings.yaml. The README states that this section supports hot reloading, and you do not need to restart for configuration changes alone; it is still recommended to restart dsh web once according to the repository’s access checklist for first-time activation. The sample configuration is as follows (fields align with the official dsh-llm-deepseek, with additional stripThinkingTags and requestTimeoutMs):

llm-wechat:
  apiKeyEnv: WECHAT_API_KEY
  baseURL: https://chatapi.weixin.qq.com/openai/v1
  thinking: enabled
  reasoningEffort: high
  maxTokens: 48000
  defaultContextWindow: 200000
  models:
    - id: Deepseek-v4-flash
      name: WeChat Deepseek-V4-Flash
      contextWindow: 200000
      maxTokens: 48000
  stripThinkingTags: true
  streamIdleTimeoutMs: 300000
  requestTimeoutMs: 55000

The README marks 48000 / 200000 as the max output / max input limits of the WeChat gateway. reasoningEffort can be off | high | max, with high as the default.

If you previously configured WeChat in llm-pi-ai.providers.weixin, you must delete this section. The plugin registers the route wechat, and leftover old configurations will trigger DUPLICATE_ADAPTER; duplicate entries may also appear in the selector, and the old group does not support reasoning levels.

Typical Usage

The access sequence for third-party users provided by the repository is:
1. Install the plugin using the dsh plugin add command from the previous section;
2. Store WECHAT_API_KEY in $DSH_HOME/.credentials.yaml;
3. (Optional) Add the llm-wechat: section in $DSH_HOME/settings.yaml to set the default level (defaults to high if not specified);
4. Restart dsh web;
5. Select WeChat → Deepseek-V4-Flash in the model selector, then select the reasoning level off / high / max, and start chatting.

The level correspondence is subject to the README:
- off: thinking: {type: "disabled"}, no thinking, suitable for simple questions or token saving;
- high: enable thinking + reasoning_effort: high, recommended for daily use;
- max: enable thinking + reasoning_effort: max, longest thinking duration, but more likely to hit the WeChat gateway’s ~60 second timeout.

Error codes align with the official adapter, including AUTH (401/403), RATE_LIMIT (429), TIMEOUT (408/timeout), QUOTA, CONTEXT_WINDOW_EXCEEDED, TRANSPORT, STREAM_CLOSED (stream ended without [DONE]), MALFORMED_RESPONSE, EMPTY_RESPONSE, MISSING_CREDENTIAL, UNSUPPORTED_REASONING_EFFORT. When no key is present, the source code will prompt to store WECHAT_API_KEY in the credentials service (it will also be displayed on the Web Models page), or export it in the startup environment.

Applicable Scenarios and Notes

This is suitable for users who are already using DeepSeek Harness, have a WeChat Coding Plan Token, and wish to connect Deepseek-v4-flash to the dsh web model selector. It supplements the LLM provider, not WeChat message receiving and sending. If you want to chat with the agent in WeChat after scanning a QR code, you need to find another iLink channel plugin, do not install this one by mistake.

There are several restrictions noted in the repository itself that need to be understood as written:
- ~60 second request timeout. The max level thinking content can be very long (the README notes it can reach over 19k characters in testing), easily interrupted by the gateway, manifesting as TIMEOUT / 408. Use high for daily use; max requires a larger maxTokens and accepts a higher failure rate.
- Rate limiting. The README states approximately 1200 requests per 5-hour quota, with a concurrency limit of 6. Multi-step tool loops for Agents will quickly exhaust the quota, triggering RATE_LIMIT (429).
- Unstable tool rule compliance. The system prompt strong constraints only reduce the probability of directly calling collapsed tools.
- Text-only support. The WeChat gateway itself does not support image input.
- Manual synchronization with the official adapter. translate / parseSse / serializeRequest are copied from dsh-llm-deepseek (these modules are private and cannot be imported). Official upgrades will not sync automatically, you will need to realign after major DSH versions. peerDependencies has been relaxed to *, so npm will not block incompatible core packages during installation, you still need to perform regression testing yourself after upgrading DSH.

Harness is currently in developer preview, and the official README notes that there will be breaking changes. The community directory’s收录 date is listed as 2026-08-06, while the repository was actually created on 2026-08-14; the “Last Push” on the directory page stops at 2026-08-14, but you can still see performance fix commits on 2026-08-16 on GitHub. Refer to the repository page for the latest information.

Once again, the security reminder from the directory page: the plugin runs with the permissions of the current dsh process, and may execute code during installation. Review the source code and license before installation; pin the commit for reproducible installations.

Summary

dsh-llm-wechat bridges Deepseek-v4-flash on the WeChat Coding Plan gateway to DeepSeek Harness’s LLM layer. It does not modify Harness source code, only handles three key tasks:
1. Streamingly split the thinking tags mixed in content into reasoning_content
2. Block the null overwrites in tool call deltas
3. Expand tool-result blocks into role: tool messages that the gateway can accept

After installation, the WeChat option will appear in the model selector, with reasoning levels off / high / max directly selectable.

The gateway’s own 60-second timeout, quota limits, and tool compliance issues cannot be solved by this plugin. You need to handle the Token, old llm-pi-ai.providers.weixin configurations, and regression testing after DSH upgrades yourself.

Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-llm-wechat/

GitHub: https://github.com/sulfide2085/dsh-llm-wechat