Introduction

DSH’s extension mechanism is plugin-based. A specific scenario is: the main model remains text-only, but images have already appeared in the chat box. dsh-vision-fallback bridges this gap: it does not alter the main model, nor does it require extra image handling in the UI, but instead automatically passes images to a fixed vision model at the request layer, converts them, and returns them to the main model as hidden text context.

What is it

dsh-vision-fallback is a DSH plugin maintained by 1HelloMan1 with an MIT license.

Its core positioning is: the main model is selected as usual, after images are automatically handed to a fixed vision model, they are returned to the main model as hidden context. The original images in the chat box are still retained in the UI.

Verified compatible DSH versions include:

  • 0.1.2-alpha.3
  • 0.1.2-alpha.4
  • 0.1.2-alpha.5

The runtime requirement is Node >=22.13.0.

Core Features

  • Main model remains text-only, images in the chat box are automatically handed to a fixed vision model and converted to hidden text context; UI retains the original images.
  • Handles MCP / ACP persistent attachments and PTC nested images, maintaining original order.
  • Supports configuring visual enhancement via the DSH Web settings page or settings.yaml.
  • Vision model requests do not use tools, system prompts, or execution permissions.
  • Switching the main model does not change the fixed vision model.

Installation and Usage

First, install it to the web profile:

dsh plugin --profile web add dsh-vision-fallback

After installation, check the config layer to confirm the plugin has been injected:

dsh --profile web --dump-config

In the output, you should be able to see:

# == dsh-vision-fallback layer

Since the patch/bundle layer does not support hot reloading, the web process needs to be restarted:

dsh web

If preparing the plugin from the source directory, pnpm install may require adding a parameter to bypass pre-release peers restrictions:

pnpm install --config.minimumReleaseAge=0

Typical Usage

In the DSH Web UI, go to:

Settings → Vision Enhancement

Configurable items include:

  • Enabled
  • Vision model
  • Base URL
  • Credential ref

It can also be configured using settings.yaml. Listed configuration items include:

vision-fallback:
  enabled: true
  model: <vision-model>
  baseURL: <vision-base-url>
  apiKeyRef: <credential-ref>

apiKeyRef points to a credential reference in DSH credentials. The API key is resolved through DSH credentials and is not written to shell environment files.

If recordUsage is enabled, real external vision calls are appended to:

<dshHome>/vision-fallback/usage.jsonl

This record only counts real external vision calls; reused cache observations are not appended.

Applicable Scenarios and Notes

Suitable for the following scenarios:

  • The main model is text-only, but you want images in the chat box to enter the context visible to the main model.
  • You want to fix a vision model for image-to-text conversion, without changing it when the main model switches.
  • You need to handle regular chat images, MCP / ACP persistent attachments, PTC nested images, while maintaining the original order.

Notes before use:

  • The explicitly listed compatible versions are 0.1.2-alpha.3, 0.1.2-alpha.4, 0.1.2-alpha.5.
  • After installation, dsh web needs to be restarted because the patch/bundle layer does not support hot reloading.
  • Vision model requests do not use tools, system prompts, or execution permissions.
  • API key is resolved via DSH credentials and is not written to shell environment files.
  • The plugin runs with the permissions of the current dsh process; source code and license should be checked before installation.
  • usage.jsonl only records real external vision calls, not reused cache observations.

Reference

GitHub: https://github.com/1HelloMan1/dsh-vision-fallback