Introduction¶
The built-in vision offloading default limit in DeepSeek Harness (DSH) is approximately 20MB or 600 images. Many OpenAI-compatible relay providers usually crash before that limit is reached. Every read_image call or pasted image remains in the conversation history and is re-sent in the next turn.
Plugin Introduction¶
dsh-image-amnesia is a DeepSeek Harness configuration package. Maintained by Choco-Zz, it is designed to preserve native vision capabilities (such as Grok, Claude, and GPT) while preventing historical images from being repeatedly uploaded to relay providers.
Core Features¶
- Preserve native vision: Ensures the current conversation can use vision models normally.
- Discard historical images: Drops older historical images before requests are sent to relay providers.
- Retain the latest images: Always keeps the most recent
keepAtLeastimage(s). - Resource optimization: Reduces token usage and helps prevent relay provider crashes.
- Global coverage: All agents in the profile (including subagents and task board tasks) use this plugin.
Installation and Enablement¶
Install it once per profile to cover the entire configuration; no separate installation is needed for each agent.
# Web Profile
pnpm dsh plugin --profile web add github:Choco-Zz/dsh-image-amnesia
# Desktop Profile
pnpm dsh plugin --profile desktop add github:Choco-Zz/dsh-image-amnesia
# 本地检出
pnpm dsh plugin --profile web add "link:D:/CodexProjects/dsh-image-amnesia"
Configuration¶
After installing the plugin, you can adjust the retention policy by editing the configuration file.
| Key | Default | Meaning |
|---|---|---|
enabled |
true |
Master switch |
maxImages |
6 |
Number of images retained in outbound requests |
maxBytes |
6291456 |
Byte budget for retained images |
keepAtLeast |
1 |
Never discard the latest N image(s) |
You can edit image-amnesia.maxImages in settings.yaml, or edit the package-bundled cordis.patch.yml.
Verification¶
Paste seven images in a single session. Check the host logs:
dsh-image-amnesia: dropped 1/7 image(s); kept 6
Notes¶
- Installation location: Install it once per profile; do not install it separately for each agent.
- Local storage: Local sessions still store all original images; only outbound requests are processed with the projection logic.
- dsh.client: Do not add a fake
dsh.clientcomponent unless it is a real lazy-CJS client package (otherwise it may prevent DSH Desktop from starting). - License: MIT License.
Conclusion¶
By dropping older images before outbound requests and retaining the latest images, this plugin effectively addresses relay provider crashes caused by too many images. It is well suited for DSH profiles that frequently use vision features.