Introduction¶
DeepSeek Harness (DSH) supports extending functionality through plugins. In text-only conversations, pure text models usually cannot process image inputs. dsh-vision-fallback is a workflow plugin maintained by WEIHAOLEE. It adds a “Vision Proxy” toggle to DSH’s text-only sessions. When enabled, the plugin forwards plain-text requests as-is to the currently selected model, and automatically forwards requests containing images to a vision provider.
Core Features¶
- No intervention for pure-text requests: They go through the model you originally selected (any text model works).
- Automatic forwarding for image-bearing requests: The images + text from the current message are sent directly to the vision model (OpenAI-compatible), without conversation history.
- Toggle-based usage: There is a “Vision Proxy” toggle next to the input box. Enable it to use it; disable it to restore the original behavior.
- Multiple vision providers: In the “Vision Models” panel in Settings, you can add/remove providers, set a default, test connections, with hot reloading.
- Original images sent directly: No image compression is performed.
- OpenAI compatible: Vision providers must support the OpenAI-compatible interface.
- SSE streaming translation: Supports streaming responses.
Installation¶
# 1. 安装进 profile
dsh plugin --profile web add D:\dsh-vision-fallback
# 2. 把插件加入 profile 的 bundle 列表
# 编辑 %DSH_HOME%\profiles\web\package.json,在 dsh.profile.bundles 里追加:
# "@local/dsh-vision-fallback"
# 3. 插件依赖自包含
cd D:\dsh-vision-fallback
pnpm install
# 4. 重启 dsh web
dsh web
Installation notes
*dsh plugin addlinks the plugin into the profile vialink:. When Node resolves imports inside the plugin, it restores the real path, so the plugin directory must have its ownnode_modules.
* Theexportsfield inpackage.jsonmust keep the"./package.json"entry, otherwise the settings panel will never load.
Configuration¶
Hot reloads in the llm-vision-fallback: section of %DSH_HOME%\settings.yaml:
llm-vision-fallback:
defaultProvider: ark # 含图请求走哪个服务商
providers: # 可配多个,面板里也可管理
ark:
displayName: 豆包(火山方舟)
baseUrl: https://ark.cn-beijing.volces.com/api/v3
model: doubao-seed-2-1-turbo-260628
apiKeyEnv: ARK_API_KEY # 凭据引用:key 本身存在 DSH 凭据库,绝不在配置文件里
- API Keys are written via the DSH credentials service (Settings page / credentials entry point). This repository does not contain any secrets.
- To add a provider (SiliconFlow / Bailian Qwen / GLM / OpenRouter / local vLLM…): it only needs to be OpenAI-compatible.
Usage¶
- Select your text model in the conversation (any).
- Click the “Vision Proxy” toggle next to the input box (it turns blue and displays “Vision Proxy · your model name”).
- Normal chat = your model; ask the agent to view an image (
read_image) = automatically forwarded to the vision provider. - Want to switch vision providers: Settings → Vision Models panel.
Notes¶
- Development nature: This is a vibe-coding artifact. The author’s understanding of DSH internal APIs is based on reading source code and trial-and-error, and does not guarantee alignment with official intent. Currently only verified environment: Windows 11 + deepseek-v4-pro + Volcano Ark Doubao (single account); other systems/providers untested.
- Image handling: Vision requests only send the last message (images + text): multi-turn “ask about the previous image” scenarios are not applicable; when following up, please resend the image. Original images are sent directly without compression: very large images may exceed Doubao’s image token limit.
- Token limit: The
max_tokensfor vision responses is clamped to 8192. - Provider requirements: Vision providers must be OpenAI-compatible (
/chat/completions+ SSE +/models). - Routing dependency: While the toggle is enabled, the session route is attached to
vision-fallback: if the plugin is uninstalled/disabled, the session will become invalid, and you must manually switch back to the original model. - Configuration gotchas: Missing
./package.jsoninpackage.json exports→ settings panel never loads; client RPC returns a{result:{ok,value}}envelope, and forgetting to unwrap it → panel is forever “not writable”.
Uncertainties and Known Issues¶
- Understanding of DSH internal mechanisms: The author’s understanding of DSH internal APIs (
LlmAdapterseam, slots, RPC envelope) is based on reading source code and trial-and-error, and does not guarantee alignment with official intent. - Unverified scenarios: Simultaneous multiple-image reading, concurrent toggle switching, and behavior in subagent sessions are unverified; reasoning intensity (
off/high/max) pass-through has only been verified withdeepseek-official. - Compatibility: The official “Models” settings page also displays provider rows for this plugin, but it does not understand this plugin’s configuration structure—please modify settings in the dedicated panel.
License¶
MIT