dsh-read-image-jpeg-fallback
Run the following command in DeepSeek Harness:
dsh plugin install wuyiwuaa1-ship-it/dsh-read-image-jpeg-fallback
Paste the following prompt into your AI chat to install this plugin:
Install the plugin in DeepSeek Harness by running dsh plugin install wuyiwuaa1-ship-it/dsh-read-image-jpeg-fallback; source code is available at https://github.com/wuyiwuaa1-ship-it/dsh-read-image-jpeg-fallback
About this plugin
In the DSH + LM Studio openai-completions path, the read_image tool call can succeed, yet the very next provider request build chokes because LM Studio rejects the PNG or WebP image attachment. dsh-read-image-jpeg-fallback is a zero-configuration compatibility shim that fixes exactly that transport mismatch. It does not replace read_image, does not add an OCR step, and does not route the image through a separate vision model. Instead, it transparently re-encodes PNG/WebP blocks to opaque sRGB JPEG (quality 90) via sharp just before the outgoing request is assembled, so the main multimodal model still receives the image itself.
The plugin hooks into DSH's tools/post-execute event. For accepted read_image results containing PNG or WebP image blocks it reads the stored attachment, converts it locally, writes the new JPEG through DSH's attachment store, and swaps only the model-visible image block reference. The canonical tool result and the built-in read_image implementation remain untouched. The conversion is fail-open: if reading, converting, or saving goes wrong, the original result is preserved, a warning lands in the DSH log, and a successful tool call is never turned into a plugin error.
This is the right fit when your main model already natively accepts image input, you talk to LM Studio through its OpenAI-compatible route, and the only failure point is the media format at request-build time. It is not the right fit if your provider already digest the formats DSH emits, or if your main model is text-only and what you actually need is an OCR or vision-fallback pipeline.
Use Cases
- read_image succeeds in DSH but the next LM Studio provider request rejects the PNG/WebP attachment
- Preserving the native multimodal image path without adding an OCR step or a secondary vision model
- Transparently fixing media-encoding rejections on OpenAI-compatible routes
Best For
- Developers running DSH + LM Studio whose main model already accepts image input
- Users who prefer a zero-config, transparent re-encode over manually re-saving images
- Developers who want to keep the native read_image multimodal path instead of falling back to a vision model or OCR pipeline
Related Plugins
ModLens is a vision plugin for DeepSeek Harness that gives text-only models sight by reading images pasted directly into chat, with zero-config setup and multiple vision engines.
On-demand vision for text-only DeepSeek Harness agents: built-in free keyless vision chain and 14 vision tools, routing image turns as tool calls to vision models with pixel fidelity, no Python needed, one-command install.
Give text-only models in DeepSeek Harness eyes, enabling image Q&A, long-screenshot OCR, UI restoration, and GUI visual tasks.
An armor-breaking plugin for DeepSeek: rewrites instruction priority, expands refusal-blocked phrases, persists across sessions, and shows a green active indicator.