dsh-xiapan-media:给 DeepSeek Harness 增加视觉、作图和视频生成

Preface

The DSH plugin mechanism can integrate different capabilities into the same conversation. If your current workflow primarily relies on text models, but you want to directly paste images for understanding or OCR, or generate images and videos, you need a client adapter that can interface with media models.

Below, we introduce dsh-xiapan-media. Maintained by dongsheng123132, it is a plugin for DeepSeek Harness that provides the xiapan-vision vision route, gpt-image-2 image generation, and Seedance video generation through the XiaPan Cloud. The client plugin is licensed under MIT; model inference, quotas, risk control, and top-ups are provided by the XiaPan Cloud server side.

What This Is

dsh-xiapan-media is a DSH client plugin whose core value is bringing three media capabilities into existing DSH conversations: image understanding/OCR, image generation, and video generation.

The package.json declares version 0.1.0, requires node >=22.19.0, dsh >=0.1.0-rc.6, and is licensed under MIT.

Core Features

Image Understanding/OCR

The xiapan-vision route allows conversations to directly paste images. Images are translated into text by XiaPan Cloud’s qwen3.7-flash and then passed back to the original text model for further processing.

The plugin also provides three file tools:

  • xiapan_vision_analyze
  • xiapan_vision_ocr
  • xiapan_vision_locate

Image Generation/Editing

xiapan_image_generate calls gpt-image-2, supporting 1–4 images, size/quality settings, and reference images. Outputs are saved to the workspace at .dsh-media/images/.

Video Generation

xiapan_video_generate calls Seedance, supporting text-to-video, image-to-video, 5–15 seconds, and 480p/720p/1080p resolutions. Outputs are saved to .dsh-media/videos/.

Since the DSH v1 attachment service currently only natively saves images, videos are returned as real .mp4/.webm file paths.

Plugin Split

The plugin package installs three separate plugin rows at once via cordis.patch.yml. Any one of them can be individually removed from the profile.

Installation and Activation

Pinned Commit Installation

First, install using a pinned commit to ensure reproducible behavior:

dsh plugin --profile web add "github:dongsheng123132/dsh-xiapan-media#COMMIT_SHA"

Here, COMMIT_SHA is a placeholder. After release, it should be replaced with a full CI-verified commit from the README/Release; the currently verified materials do not provide a specific full commit SHA.

Selecting the Image Understanding Route

Automatic paste-based image understanding depends on the text route uking-managed. After installation, select U-King DeepSeek + XiaPan Cloud Image Understanding in the DSH model selector, with route ID xiapan-vision.

If users only have the native DeepSeek route installed, they can change the vision plugin’s innerProvider to the actual text provider ID.

Credential Order

Credentials are resolved in the following order:

  1. UKING_DSH_API_KEY from the DSH credentials service
  2. Environment variables with the same name
  3. XIAPAN_API_KEY
  4. Device credentials from ~/.uking/device.json

If no credentials are found, the plugin will prompt for login or top-up and will not attempt anonymous calls.

Authorization is only sent to api.u-claw.org.cn; the legacy domain api.u-claw.org is automatically rewritten to .org.cn.

Payment and Approval

The image generation and video tools register the DSH tools/pre-execute approval gate by default. Headless environments without an approval service will reject requests rather than silently incurring charges.

Unattended paid calls are only allowed when an administrator explicitly sets requireApproval to false.

Seedance pricing is subject to XiaPan Cloud real-time billing or the server-side billing page; plugin text is not a pricing commitment.

Security Boundaries

  • Input files must be located within the configured workspace root; .. path traversal and symlinks pointing outside the workspace are rejected.
  • Maximum input image size is 10 MiB; maximum downloaded output size is 200 MiB.
  • Outputs are written using temporary files plus atomic rename, without overwriting existing files.
  • Only HTTPS XiaPan Cloud APIs and HTTPS output URLs are accepted.
  • Error messages mask common key formats.

Development Verification

For local development, you can run:

npm install
npm test
npm run check

Suitable Scenarios and Notes

It is suitable for developers or teams who need to process images, generate images/videos within DSH conversations, and are willing to use XiaPan Cloud credentials.

Notes before use:

  • The plugin runs with the current dsh process permissions; review the source code, license, and credential configuration before installation.
  • The vision route requires a matchable text route; if you only have the native DeepSeek route, adjust innerProvider first.
  • Image generation and video generation may incur costs; approval constraints should be retained in headless or unattended environments.
  • File input and output sizes are limited, and cross-workspace paths and external symlinks are rejected.

Conclusion

The value of dsh-xiapan-media lies in integrating vision understanding, gpt-image-2 image generation, and Seedance video generation into DSH conversations, while preserving credential resolution, approval gates, and workspace file boundaries.

GitHub: https://github.com/dongsheng123132/dsh-xiapan-media
Directory page: The verified materials do not provide a URL; this article does not list uncertain directory page links.

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

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

Xiaoye