dsh-image-subagent: Enabling Pure Text Main Models to Accept Image Attachments

Preface

In the DSH plugin ecosystem, extensions typically come from adapting route declarations, placeholder projections, and tool gates. dsh-image-subagent addresses a specific problem: the primary model is a text-only route, but the session still needs to accept image attachments. The plugin projects images into explicit text placeholders carrying a complete attachmentId, and the primary model then delegates to a vision subagent to read them.

What This Is

  • Plugin name: yuqingsh/dsh-image-subagent
  • Maintainer: yuqingsh
  • License: MIT
  • Version covered in this article: v0.2.0
  • Compatibility: @deepseek-ai/dsh >=0.1.1-rc.2, this peerDependency is optional
  • Runtime environment: engines requires node >=20

One-line positioning: enables text-only primary models (such as DeepSeek V4) to accept image attachments while keeping the primary model from directly reading images — the vision subagent reads attachment objects via read_image.

Core Features

Allowing Image Access Gate

v0.2.0 changes the old “declare image capability” approach to “removing the inputModalities declaration from text-only routes.” Under the image access gate in dsh 0.1.1, an omitted declaration (undefined) is treated as a negative capability and allowed through, so pasted images are no longer explicitly rejected.

Projection as Explicit Text Placeholders

Once an image enters the session, it is projected into an explicit text placeholder carrying a complete attachmentId. After the primary model receives this placeholder, it can pass the attachment object path to the vision subagent.

The attachment object path rule is:

~/.dsh/attachments/v1/objects/<first 2 hex characters of id>/<64-character hex>

Primary Model Delegates to Vision Subagent

The primary model cannot read images itself. The read_image tool gate still rejects cases where the primary model route’s inputModalities is undefined, so the delegation flow remains: the vision subagent reads the attachment object path via the read_image tool and returns pixel-level descriptions.

Native Direct Reading for Vision Routes

If the route itself is a vision route, such as deepseek-v4-flash-vision-exp, and the declaration includes image, the plugin bypasses and preserves the native direct reading path.

Status Endpoint

The plugin provides a /image-subagent/status status endpoint to verify the current installation and projection state.

Installation and Activation

pnpm is required before installation:

brew install pnpm

Two installation methods are provided below: local checkout, or installation by git tag.

Local checkout:

dsh plugin --profile web add ./dsh-image-subagent

Installation by git tag:

dsh plugin --profile web add github:yuqingsh/dsh-image-subagent#v0.2.0

After installation, restart dsh web and refresh the page.

Typical Usage

Prerequisites

  • A vision subagent exists in the preset, such as subagent_observer
  • The subagent’s model declares image input, for example deepseek-v4-flash-vision-exp
  • The subagent’s toolset includes read_image

Usage Flow

  1. Paste an image into the DSH session with an accompanying question.
  2. The image access gate allows it through.
  3. The primary model receives a rich placeholder containing the complete attachmentId and attachment object path.
  4. The primary model delegates subagent_observer to read that path using read_image.
  5. subagent_observer returns pixel-level descriptions.
  6. The primary model answers based on the description.

Verifying Installation

Send a client-request with method set to status to the status endpoint:

curl -s -X POST http://127.0.0.1:3080/image-subagent/status \
  -H 'content-type: application/json' \
  -d '{"type":"client-request","rpcId":"s1","method":"status","payload":{}}'

Expected results for v0.2.0:

  • bridged is "(omitted — paste gate passes)"
  • real is ["text"]

For the older v0.1.x, the expected result is bridged containing "image".

Applicable Scenarios and Notes

Suitable for the following situations:

  • The primary model is a text-only route, but the session needs to accept image attachments
  • A vision subagent that can declare image input already exists
  • You want the primary model to not read images directly, but instead delegate image reading to the vision subagent
  • You want to adapt image attachment entry into the flow in dsh 0.1.1 and later release candidate versions

Points to note:

  • v0.2.0 corresponds to dsh >=0.1.1-rc.2; v0.1.x corresponds to dsh 0.1.0-rc.x
  • @deepseek-ai/dsh >=0.1.1-rc.2 is optional in peerDependencies
  • The plugin participates in session processing under the current dsh process’s permissions — review the source code and license before installation
  • The license is MIT
  • The DSH community directory is an independent site with no official affiliation to DeepSeek / High-Flyer, and should not be understood as an official app store

Conclusion

The value of dsh-image-subagent lies in: the primary model remains a text-only route, image attachments enter the context through explicit placeholders, and reading work is delegated to the vision subagent. If your DSH configuration already has a usable vision subagent and you want to avoid sending images directly to text-only endpoints, you can install and verify it following the steps above.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye