dsh-image-guard
Trims historical images in outgoing chat requests down to a recent-image count, learns the provider per-prompt image cap from HTTP 400 responses, and retries with fewer images so image-heavy sessions keep working.
发送前把请求中的历史图片裁剪至保留张数,并从上游 400 错误解析单次图片上限、按更少张数降级重试,保证含图会话不被图片数量限制打断。
How to install
dsh plugin add dsh-image-guard About
dsh-image-guard DeepSeek Harness(DSH)插件,用于保证含图会话可继续使用:在请求发送前将历史图片裁剪至预算内;上游仍因图片数量返回 400 时,插件从该错误中解析上限,并按更少的图片降级重试。 English · MIT · v0.8.17 · 变更记录 主要特性 **保留最新 N 张,其余替换为标记**——被裁剪的图片会替换为可识别标记(文件名 / 路径 / 指纹 / 取回方式),模型或 agent 需要时可再次取得该图,而不是无声丢失。 **解析上游上限**——从 At most N image(s) may be provided in one prompt 中解析上限 N,并按 N−1 张重试;解析到上限后,同进程内后续请求直接按 N−1 张发送。 **节省视觉 token**——每张被裁剪的图片净省约 930 token(实测上限 972 − 标记开销约 40);14 张裁剪至 7 张约每轮省 6.5k token,设置页实时显示累计节省量。 **不修改会话历史**——仅修改即将发出的请求体(structuredClone 的副本),前缀缓存保持有效,关闭插件即恢复原有行为。 **始终保持在 fetch 链首**——拦下 globalThis.fetch 的赋值(新来的包装器收作下层、照旧生效),配合 200ms 看门狗与链上探针兜底,避…
Recommendation signals
Meta
- License
- MIT
- Language
- JavaScript
- GitHub stars
- 0
- mo. downloads
- –
- Last push
- 2026-09-14
- Created
- 2026-09-12
Basic safety check
- Findings
- None
- Sources
- curated:awesome-dsh-plugin.com, curated:awesome-dsh-plugin/awesome-dsh-plugin
- Topics
- cordis, deepseek, dsh, dsh-plugin, vision, vllm
Related plugins
dsh-comfyui
fandc520/dsh-comfyui
Drive a local or remote ComfyUI server from DeepSeek Harness: comfyui_run / comfyui_object_info / comfyui_workflow tools generate and edit images and videos, with a workflow library (graph extraction: per component / main flow / all), a load area with resolution auto-match, a live queue, SDXL and Wan 2.1 templates, a companion skill, and a same-origin media proxy.
dsh-web
zhu1090093659/dsh-web-ui/tree/main/packages/dsh-tool-describe-image
A `describe_image` vision tool for text-only models: images (local path, URL, attachment) go to a configurable OpenAI-compatible vision endpoint and only the returned text enters the session.
modlens
liustack/modlens
Vision bridge for text-only models: paste an image, get structured JSON evidence (OCR, layout, semantics).
dsh-vision-router
ysr666/dsh-vision-router
Free vision for text-only agents: built-in keyless vision chain plus pixel tools (Q&A, grounding, crop, pixel diff, colors, OCR, SVG trace, cutout, screenshots); paste an image to use it.