dshbase

插件目录 / Developer / dsh-vision-tool

dsh-vision-tool

未验证 visail

✓ 持续维护 基于 3 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

1Stars
0Forks
0未关闭 issue
语言
2026-08-14最近推送
跨平台平台

功能简介

Paste an image into the chat box and text-only DSH models can "see" it — auto-rewrite of pasted images + analyze_image tool routed to a Kimi vision model.

我们的评价
未验证 — 尚未实测

Paste an image into the chat box and text-only DSH models can "see" it — auto-rewrite of pasted images + analyze_image tool routed to a Kimi vision model. 尚未验证——请自行安装测试。

「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

你是插件作者? 想拿到「已验证」标签——提交你自己的验证证据(截图、日志或短视频),我们审核通过后即改为「已验证」。

提交验证证据 ↗

README

dsh-vision-tool

Image routing for text-only models in DeepSeek Harness (DSH).

Text-only models (e.g. deepseek-v4-flash) cannot see images. This bundle gives
them eyes in two coordinated steps:

  1. vision-prompt — shadows POST /api/session.prompt. When the active
    session model does not support image input, pasted images are persisted as
    content-addressed attachments and rewritten in place into text prompts that
    carry the full attachment reference JSON. Any other request (no image, or a
    model that already supports images) is forwarded unchanged, with the
    official /api trust fence (DNS rebinding / cross-site defense) reimplemented.
  2. vision-tool — registers a global analyze_image tool. The model calls
    it with the attachment reference (or a local file path); the tool routes
    the image to a vision model and returns its text answer.

Verified end-to-end: paste an image → attachment persisted → model calls
analyze_image → vision model describes the image.

Install

Requires the dsh CLI (see package and install a plugin).

# from npm (once published)
dsh plugin --profile <name> add dsh-vision-tool

# straight from a git host (pin a commit; no build step needed — pure ESM)
dsh plugin --profile <name> add github:<you>/dsh-vision-tool#<sha>

# or from a local tarball
pnpm pack
dsh plugin --profile <name> add ./dsh-vision-tool-0.1.0.tgz

The bundle's cordis.patch.yml inserts two rows: vision-tool and
vision-prompt. Restart the profile afterwards:

dsh --profile <name>

Verify the layer landed without booting:

dsh --profile <name> --dump-config   # look for the "# == dsh-vision-tool" layer

Configuration

Credential (required)

The tool resolves KIMI_CODE_API_KEY — from $DSH_HOME/.credentials.yaml or an
environment variable of the same name. Get the key from your
Kimi Code subscription page (sk-kimi- prefix).

# $DSH_HOME/.credentials.yaml
KIMI_CODE_API_KEY: sk-kimi-...

Switching vision models

The defaults target kimi-for-coding at https://api.kimi.com/coding/v1.
Override the row in your profile's cordis.patch.yml (a patch replaces the
whole config, so restate every key you keep):

- id: vision-tool
  name: dsh-vision-tool
  config:
    baseURL: https://api.kimi.com/coding/v1
    model: kimi-for-coding
    apiKeyEnv: KIMI_CODE_API_KEY
    maxImageBytes: 20971520
    timeoutMs: 120000

Note: kimi-for-coding only accepts temperature: 1 (anything else is
rejected with HTTP 400). The tool hard-codes temperature: 1 as its default
and is not configurable for this model. Other OpenAI-compatible vision
endpoints generally work as long as they accept temperature: 1.

Supported inputs

  • attachment — full reference JSON injected by the paste-rewrite mechanism
    ({"attachmentId":"sha256:...","mediaType":...,"bytes":N,"width":N,"height":N}).
    Pass it verbatim; do not strip fields.
  • path — local image file (absolute, or relative to the session cwd).
  • Formats: png / jpg / jpeg / webp / gif. Local files up to
    maxImageBytes (default 20 MB). Attachments are bounded by the harness
    attachment store limits.

Security

  • vision-prompt reimplements the official /api trust fence: loopback /
    trustedHosts host check, sec-fetch-site and Origin checks.
  • Request bodies are capped at 160 MB (413 otherwise), matching the harness
    http-bridge default.
  • Any failure degrades to passthrough — the original request is forwarded
    unchanged, never swallowed or mangled.
  • The tool only reads the attachment you reference and your configured
    credential; it never stores prompt or image content beyond the attachment
    store the harness itself maintains.

Diagnostics

Both plugins append to $DSH_HOME/vision-trace.log:

handle: rewrite result = REWRITTEN
vision-tool: execute: resolve KIMI_CODE_API_KEY -> source=file len=72

License

MIT

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-vision-tool」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:visail/dsh-vision-tool

Headless(CLI)profile:

dsh plugin --profile headless add github:visail/dsh-vision-tool

实测报告

尚未 L3 验证——若已跑过,见下方失败备注。

状态:pending · 最近测试 2026-08-27 · 标记 webonly
备注:验证: web-only;待 L4 web CDP;L4 web CDP runtime-fail on dsh 0.1.0-rc.8. 浏览全部待验证失败 →
安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7795 个插件 →