dsh-image-guard: Image Budget Management Plugin for DeepSeek Harness

dsh-image-guard is a plugin for DeepSeek Harness (DSH) designed to address multimodal session interruptions caused by clients using byte-based budgets while upstream models enforce limit the number of images. It operates at the first layer of the fetch chain. Its core features include retaining the latest N images and replacing the rest with identifiable markers to save tokens, as well as parsing upstream 400 errors to dynamically adjust the number of images sent, avoiding repeated failures. The plugin supports configuration and hot updates, and uses a chain probe to ensure it is always placed before the proxy. Installation requires manually editing the profile file.

Read More