概览
dsh-image-guard
DeepSeek Harness plugin: trims the oldest images from outgoing chat requests and, when the provider rejects the image count with HTTP 400, parses the limit from the error and retries with fewer images. · DSH 插件:裁剪即将发出请求中的历史图片,并在上游因图片数量返回 400 时解析该上限并按更少的图片重试。
README / ZH
插件文档
目录摘要
DeepSeek Harness plugin: trims the oldest images from outgoing chat requests and, when the provider rejects the image count with HTTP 400, parses the limit from the error and retries with fewer images. · DSH 插件:裁剪即将发出请求中的历史图片,并在上游因图片数量返回 400 时解析该上限并按更少的图片重试。
dsh.pub 核对固定版本的组合包契约、运行时事实与分发语义;完整 README 请查看源仓库。
在 GitHub 阅读完整 READMELIMITATIONS
已知限制
| 限制 | 说明 | |---|---| | 仅控制**图片张数** | 不压缩、不缩放图片;字节预算不在处理范围 | | 首次仍会出现一次 400 | 上限只能从 400 响应中获知 | | 仅针对历史图片 | 最新 N 张按原样发送(含字节) | | 与其他 fetch 包装插件的顺序 | 本插件固定在最上层、对方位于其下层:两者都生效,代价是直连模式下请求多穿一层包装 | | 靠赋值抢占链首的插件会被拦下 | 它不会通过读取 `globalThis.fetch` 发现自己未在链首;若它整个替换该属性,200ms 内会被抢回(期间该插件仍会被调用) | | 已内联且无路径的图片无法恢复 | 标记中携带指纹并明确说明 | | 依赖 DSH 当前的请求形态 | 形态不匹配的请求会透传(诊断页可见) |
