dsh-wb400-guard
Fixes the WorkBuddy China gateway 400 (code 11128) when using DeepSeek Harness with a domestic WorkBuddy reverse proxy. One command, zero runtime dependencies.
一句话定位
Fixes the WorkBuddy China gateway 400 (code 11128) when using DeepSeek Harness with a domestic WorkBuddy reverse proxy. One command, zero runtime dependencies.
安装方式
在 DSH 的 web profile 中执行下面的命令;装完刷新页面即可。
$ dsh plugin --profile web add 'git+https://github.com/curo22/dsh-wb400-guard.git#3b04c69adbc5166c576daa31fa0d3e0a9f851d78'
兼容的 DSH 版本
未声明
作者与热度
curo22 · ★ 10 · 更新于 2026-10-31
关于这个插件
dsh-wb400-guard
中文 | [English](README.en.md)
一条命令修掉 DeepSeek Harness 走 WorkBuddy 国内版反代时每轮对话都失败的 400。
本轮运行失败 400: {"message":"workbuddy upstream client (http 400): 请求被拦截,请重新发送","type":"client","code":"client"}
标签 INVALID_REQUEST,底层是网关的 code 11128。走国际版(www.workbuddy.ai)不出现。
---
30 秒判断你需不需要它
| 现象 | 命中 |
|---|---|
| 报错文字是「请求被拦截,请重新发送」,标签 INVALID_REQUEST | 是 |
| 换成国际版模型就正常,换回国内版就失败 | 是 |
| 每次都在第一步就挂,连一句完整回复都没有 | 是 |
| 换个账号、换个模型、换台机器,症状一模一样 | 是 |
| 手动在 WorkBuddy 官方客户端里聊天是正常的 | 是 |
| 报的是 429 或「usage exceeds frequency limit」 | 否,那是额度 |
| 报的是 11101 或「Non-stream chat request」 | 否,那是非流式请求 |
| 报的是 fetch failed / 502 | 否,那是网络 |
上面前三条同时命中,基本可以确定就是本文档解决的那个问题。
为什么会被拦
国内网关 copilot.tencent.com 在服务端对 system 消息做通道校验,命中规则就回:
{"code":11128,"msg":"Illegal API invocation from an unapproved channel"}
插件包把这条错误包装成「请求被拦截,请重新发送」。触发这条规则的来源有四个,互不相关,DSH 默认全都带着,所以插件全都要处理。
前两个是本机实测定位出来的;后两个来自 [a1141171521/dsh-multi-agent-gateway#1](https://github.com/a1141171521/dsh-multi-agent-gateway/issues/1) 的真实失败——那台机器上四段同时在,只修前两段必挂。
触发源一:文件引用说明里的那一段字
@deepseek-ai/dsh-file-reference 会往 system prompt 里注入这段:
Tokens prefixed with @ are paths the user explicitly referenced. Relative paths resolve from the workspace root; absolute paths identify files or directories on the host. ... @\"...\" quotes a path containing spaces.
它不是「只要出现 @ 就拦」。逐词删词消融能直接看出来:这段话里删掉 Tokens prefixed with are paths the user explicitly Relative resolve from workspace 里的任何一个词,请求立刻变 200;删掉后半截的词(referenced. root; absolute identify files or)照样 400。
也就是说网关匹配的是前段连续词组 + 那个 @ 字形这个组合,不是单个字符。同一份文本把 @ 去掉,或换成等义的 (at),都变 200。
触发源二:内核身份句
@deepseek-ai/dsh-system-prompt 的官方发布版默认 includeHarnessIdentity = true,会在 system 最前面放一句:
You are an AI agent powered by DeepSeek Harness.
(DeepSeek 和 Harness 之间是一个零宽空格 U+200B。)
这句只要位于 system 消息开头就会被拦。放到句子中间、放到消息尾部、前面先垫一行别的文字,都不拦。零宽字符、前置普通空格、前置 BOM 都绕不过去。
本机这个坑被 ~/.dsh/prompt-inject.md 顶掉了,所以有些人只撞到触发源一;没写过注入文件的用户两个都会撞。这也是为什么另一个插件只修了身份句、用户升级后照样报错——两个源必须一起修。
触发源三:personaPrefix 里的 coding agent 句
@deepseek-ai/dsh-web-app 的 cordis.patch.yml 用 personaPrefix 往 system 里插一句:
You are a coding agent powered by the workbuddy/hy4-preview model.
模型名由内核插值,国内版是 workbuddy/hy4-preview,国际版是 workbuddy-intl/deepseek-v4.1-flash。
这句里没有任何品牌词,网关认的是 coding agent powered by 这个句式,所以换模型名救不了。
触发源四:Web GUI 段
@deepseek-ai/dsh-harness-dev-context 注册了两段,默认都在:
You are interacting with the user through the DeepSeek Harness Web GUI whose URL the runtime context names. ...
Current DeepSeek Harness Web GUI URL: "http://127.0.0.1:43120".
这两段在 system 的尾部(偏移 6552 左右),不在开头——所以只做「开头锚定」的修法完全够不到它们。
同分类对比
同一分类下 Star 最高的 5 个,便于横向比较。
| 插件 | 作者 | Star | 版本 | 更新 |
|---|---|---|---|---|
| Mole | tw93 | 74.5K | 0.0.0 | 2026-11-10 |
| DeepSeek-Reasonix | esengine | 36.1K | 0.0.0 | 2026-11-10 |
| dsh-desktop | anywhere-labs | 35.6K | 0.4.1 | 2026-11-06 |
| awesome-dsh-plugin | awesome-dsh-plugin | 24.1K | 0.1.0 | 2026-11-10 |
| dsh-market | dsh-market | 11.8K | 1.73.17 | 2026-11-09 |