DeepSeek Harness 插件

dsh-vision-tool

Image routing for text-only models in DeepSeek Harness: a global analyze_image tool (Kimi vision) plus automatic rewriting of pasted images into attachment references when the active model cannot s...(英文原文)

跳到安装方式

来源信息

GitHub 仓库
visail/dsh-vision-tool
最近更新
2026年8月14日
分类
视觉与多模态
GitHub stars
1
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/visail/dsh-vision-tool
插件名:dsh-vision-tool
作者:visail

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

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](./LICENSE)