AI Agent Hub
Back to plugins
🖥️

dsh-plugin-modality-fallback

Client Updated 2026.08.21

Run the following command in DeepSeek Harness:

dsh plugin install lilei0311/dsh-plugin-modality-fallback

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install lilei0311/dsh-plugin-modality-fallback in your terminal to install the plugin (source: https://github.com/lilei0311/dsh-plugin-modality-fallback) into your current dsh profile, then configure a fallback route in cordis.patch.yml to activate it.

About this plugin

Running multimodal conversations in dsh carries a small but recurring friction: the entire session is locked to one model, and when that model does not declare image-input support, the first image in the conversation history triggers an outright refusal from the built-in read_image tool while ApiProxy blocks the outbound send. The typical workaround is to switch the entire session to an image-capable model, which means giving up the specific model chosen for code generation, long-form reasoning, or any other non-visual task in the same conversation.

dsh-plugin-modality-fallback takes a narrower approach: leave the session alone and redirect only the single request that actually needs the missing modality. The plugin hooks into the dsh request waterfall and, before a message is dispatched, inspects the session-derived history for content that exceeds the resolved model declared input modalities (currently images). When a mismatch is detected and a fallback route is configured, it swaps provider and model for that one request only. Once the request completes, the session original model selection is untouched; subsequent requests resolve normally as soon as the image scrolls out of context or the user changes models. No core deepseek-harness code is modified; this is a standard Cordis plugin that loads alongside the rest of the composition.

If the dsh workflow mixes visual-understanding tasks with work that benefits from a specific model reasoning or coding strengths, and bouncing between two models every time an image shows up feels like unnecessary overhead, this plugin removes that friction. Setup is a single modality-to-model mapping in cordis.patch.yml; the routing hook handles the rest automatically.

Use Cases

  • Auto-downgrading a single request when an image appears but the session model lacks image input
  • Avoiding a full session model switch just to handle one image-containing message
  • Keeping the preferred model for all non-visual tasks while routing image requests to a capable fallback

Best For

  • dsh users combining image understanding with text-only reasoning in one session
  • dsh administrators managing model capability at request level rather than session level
  • Developers extending multimodal routing without modifying deepseek-harness core code