
sulfide2085/dsh-llm-wechat
60Last commit Aug 14, 2026
dsh-llm-wechat DSH plugin
This plugin adds a WeChat gateway adapter for DeepSeek Harness (DSH), allowing DSH to use the WeChat Mini Program 'Coding Plan' Deepseek-v4-flash model as if it were the official DeepSeek. It intercepts the stream response to strip thinking tags from content and place them into reasoning_content, and fixes tool call delta fragments that carry null id/name. It also injects a reasoning level selector (off/high/max) in the model picker UI.
How to install the dsh-llm-wechat DSH plugin
dsh plugin --profile web add ./dsh-llm-wechatCopying does not run this command. Review the repository and version before installing the dsh-llm-wechat DSH plugin.
dsh-llm-wechat DSH plugin data source
dsh-llm-wechat DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-llm-wechat DSH plugin can do
- Strips thinking tags from content and repositions them into reasoning_content for proper thought block display
- Fixes tool call delta fragments that send null id/name, ensuring correct tool invocation
- Exposes reasoning level dropdown (off/high/max) in the model selector automatically
- Injects system prompt reinforcement to improve tool call compliance
- Configurable request timeout and retry policy to handle WeChat gateway limits
Where the dsh-llm-wechat DSH plugin fits
- Use WeChat-provided Deepseek-V4-Flash as the LLM backend in DSH applications
- Get proper thinking block display in DSH UI when using WeChat channel
- Enable tool calling (function calling) with WeChat's LLM, which normally has quirks
- Run DSH agents with a free or low-cost LLM alternative (if available via WeChat)
Who the dsh-llm-wechat DSH plugin is for
- DSH users who want to use the WeChat Coding Plan Deepseek model
- Developers integrating WeChat's LLM capabilities into DSH-based workflows
dsh-llm-wechat DSH plugin limitations
- WeChat gateway has a 60-second request timeout; 'max' reasoning effort may often timeout
- Rate limited to ~1200 requests per 5 hours with concurrency cap of 6
- WeChat model does not natively support image input; plugin is text-only
- Plugin copies private code from official dsh-llm-deepseek; updates may not auto-sync with DSH upgrades
dsh-llm-wechat DSH plugin: from the repository README
Quoted from the sulfide2085/dsh-llm-wechat README, the upstream source of the dsh-llm-wechat DSH plugin. Copyright remains with the original authors.
中文 | [English](README.en.md) > 独立公开仓库:本插件从项目内独立维护,源码位于 `dsh-llm-wechat` 仓库。 DeepSeek Harness 的**微信网关适配插件**:让 DSH 把微信小程序「Coding Plan」的 Deepseek-v4-flash(chatapi.weixin.qq.com)当作官方 DeepSeek 使用——思考进思考块、工具调用正常、正文无标签。 复用官方 `dsh-llm-deepseek` 的 `DeepSeekAdapter`(请求序列化、错误映射、模型解析、重试策略全部继承),只在响应侧加了一层**流式转译**。**不修改任何 DSH / pi-ai 源码。** ## 为什么需要这个插件 微信网关的返回有三个官方 DeepSeek 没有的怪癖,DSH 原生解析器无法处理: | 微信的怪癖 | 插件处理 | |---|---| | 思考内容不放 `reasoning_content`,而是连同 `</think>` 标签**整个塞进 `content`** | 流式拦截器把 `</think>` 之前的文本剥离并重排进 `reasoning_content`,正文只留纯净答案 | | 工具调用流式 delta 的后续片段**显式发 `id: null` / `name: null`**,覆盖首个 delta 的正确值 | 只接受非空字符串更新 id/name | | DSH 的工具结果以 `tool-result` 块存放,序列化时需展开为 `role: tool` 消息 | 对齐官方完整版(含 `(no output)` 兜底) | ## 工作原理 ``` 微信流: "We need answer... final. </think>141.3717" (思考+标签全在 content) │ ▼ WechatAdapter.request(拦截器:parseSse 与 translate 之间) DSH 流: reasoning_content: "We need answer... final." content: "141.3717" (标准格式,DSH 上层无感) ``` - **请求侧**:微信端点协议与官方 DeepSeek 完全一致(OpenAI 兼容),原样透传,仅映射思考档位 `off/high/max` → `thinking: {type}` + `reasoning_effort`。 - **响应侧**:`translate` 前插入 `ThinkTagSplitter` 状态机(处理标签跨 chu
Read the full READMEThe repository declares no license. Check with the authors before using it.
dsh-llm-wechat DSH plugin questions
How do I install dsh-llm-wechat plugin?
You can install it using the DSH plugin command: `dsh plugin --profile web add ./dsh-llm-wechat` (if you have the local directory) or `dsh plugin --profile web add @deepseek-ai/dsh-llm-wechat` (once published to npm). After installation, you also need to set up the `WECHAT_API_KEY` credential in your `.credentials.yaml` file and optionally configure settings in `settings.yaml`. Restart the DSH web profile to activate the plugin.
How do I configure the API key and settings?
Store your WeChat API token in `$DSH_HOME/.credentials.yaml` as `WECHAT_API_KEY: <your-token>`. You can also set it as the environment variable `WECHAT_API_KEY`. Additionally, you can add an `llm-wechat:` section in your `settings.yaml` to customize options like `thinking`, `reasoningEffort`, `maxTokens`, etc. The plugin supports hot-reload for settings, so no restart is needed for changes.
Why don't I see the reasoning level dropdown in the model selector?
The reasoning level dropdown appears only for the WeChat provider route registered by this plugin. If you previously configured WeChat via `llm-pi-ai.providers.weixin` or other means, you must delete that old configuration, otherwise the model selector may show duplicate entries without the reasoning level. After removing the old config and installing the plugin, the dropdown (off/high/max) should appear automatically.
I keep getting timeouts when using the 'max' reasoning level. What can I do?
The WeChat gateway has a hard 60-second timeout, and 'max' reasoning often takes longer, resulting in `TIMEOUT` errors. We recommend using the 'high' level for daily use, which balances thinking depth and success rate. You can also increase `requestTimeoutMs` in settings (default 55s) to be closer to 60s, but the gateway timeout is unavoidable. If you need 'max' occasionally, be prepared for higher failure rates.
I previously configured WeChat via pi-ai provider. Do I need to remove it?
Yes, absolutely. If you have an existing `llm-pi-ai.providers.weixin` configuration, you must delete it before installing this plugin. Otherwise, DSH will encounter a `DUPLICATE_ADAPTER` error because both the old pi-ai config and the new plugin try to register the same route. After removing the old config, install the plugin and restart DSH.