dami9527/dsh-image-pathify 预览 preview

dami9527/dsh-image-pathify

DeepSeek Harness插件:让deepseek-v4-flash等无法查看图片的模型也能处理聊天中的图片,内置识图工具。安装:dsh plugin --profile web add dsh-image-pathify

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness that allows non-vision-capable models like deepseek-v4 to process images shared in chat. Before messages are sent to the model, the plugin replaces images with their local file paths saved by DSH, so the model can call the built-in analyze_image tool to fetch text descriptions via your configured vision API. To install the plugin, run dsh plugin --profile web add dsh-image-pathify then start DSH with dsh web, then open the plugin settings page to fill in your configuration. It requires DSH version 0.1.1-rc.1 or newer, and has been tested on version 0.1.5-rc.1.

Once installed and configured, the plugin works automatically for all models. For models that already support vision, images are sent as-is, and the analyze_image tool won’t appear in their tool list. For non-vision models, when you upload an image or share an image URL, the plugin converts the image to a local path, then the model calls analyze_image to get the description. Multiple images can be processed in a single API request, so you don’t have to wait for one image to finish before sending another. This plugin is ideal for DSH users who use non-vision models and need to process images in daily chat.

The plugin is released under the open source MIT license, so you can use it for free for any personal or commercial purpose. It supports any OpenAI-compatible vision API endpoint, you just need to change the base URL and model name in your settings to use third-party services like Qwen DashScope. If a new version is released, the plugin will notify you of an update and provide a pre-written copy-paste upgrade command. To complete the upgrade, you just need to terminate your current DSH process, run the copied command, then restart DSH. Your API key is stored separately from your settings in the credentials file, which keeps it secure.

这是一个DeepSeek Harness原生插件,用于让deepseek-v4这类不支持原生识图的模型也能处理聊天中插入的图片。插件会在发送消息给模型前,把图片转换为本地文件路径,由模型调用内置的analyze_image工具,通过用户配置的视觉API获取图片的文字描述。聊天界面里的图片缩略图不会改变,本身已经支持识图的模型也不受影响,本插件复用DSH保存的附件,不会额外再存储图片。

用户安装本插件后,只需要在DSH的设置→插件→识图界面填写API密钥、选择识图模型、填写API地址就能使用,支持任何OpenAI兼容的视觉接口,包括DeepSeek官方、千问DashScope等主流服务。安装完成后,给不支持识图的模型发送图片或者图片URL,插件会自动处理整个流程,让模型调用analyze_image工具一次性完成多张图片分析,适合需要让非视觉大模型处理聊天贴图的DSH用户。

本插件要求DeepSeek Harness版本不低于0.1.1-rc.1,已经在0.1.5-rc.1版本验证可用,更低版本的DSH需要安装0.1.8版本的插件。插件采用MIT许可协议,完全免费开源。安装后如果有新版本,插件会提示更新,用户复制命令,终止当前DSH进程后执行升级命令,再重启DSH就能完成更新。API密钥会保存在DSH的credentials文件中,不写入设置文件,保障安全。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-image-pathify

把 dami9527/dsh-image-pathify 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-image-pathify

0.2.0 需要 DeepSeek Harness >= 0.1.7-rc.1。dsh 0.1.5 及以下请继续使用 dsh-image-pathify@0.1.9。

让 deepseek-v4 这类「不能看图」的模型,也能处理你贴进聊天里的图片,并直接调用插件内置的识图工具。

聊天记录和界面里的缩略图不会变。插件只在把消息发给模型前,把图片换成一行本地文件路径;模型再调用 analyze_image 读这个文件,通过你配置的视觉 API 得到文字描述。

你贴一张图  →  聊天里照常显示缩略图
           ↓
发给不能看图的模型前  →  变成:Saved attachments: /某路径/某文件
           ↓
模型调用 analyze_image  →  视觉 API 返回文字描述(多张图一次请求、同一次看见全部)

已经能看图的模型不受影响:图片会原样发给它们,analyze_image 不会出现在它们的工具列表和系统提示里。read_image 在不能看图的模型上会被拒绝,并提示改用 analyze_image。

磁盘上的图片文件是 dsh 自己保存的附件(~/.dsh/attachments/v1/...),不是本插件另存的一份。

安装

dsh plugin --profile web add dsh-image-pathify
dsh web

打开 插件 → 识图 进详情页可配置(插件旧版 0.1.x 在 设置 → 插件 → 识图),填写后点保存:

  • API 密钥(写入 $DSH_HOME/.credentials.yaml,不进设置文件)
  • 识图模型(默认 deepseek-flash)
  • 识图 API 地址(默认 https://api.deepseek.com)
  • 禁用思考(默认勾选)。DeepSeek 识图模型(如 deepseek-flash)默认会思考,思考 token 计入输出上限;取消勾选才会走思考模式,开启思考时应增大输出上限

任何 OpenAI 兼容的视觉接口都可以,把地址(部分地址需要后面加/v1)和模型改成你的服务即可。设置页改动保存后立即生效,不用重启。

设置 → 插件 → 识图

更新

已装版本落后于 npm 最新版时,识图卡片 header会显示「发现新版本 x → y」和 复制升级命令,点按钮把命令复制到剪贴板。命令里的 --profile 按当前进程解析,取不到兜底 web。

更新

  1. 结束当前正在跑的dsh,例如: dsh web(终端里 Ctrl+C)
  2. 执行复制出来的命令:
dsh plugin --profile web add dsh-image-pathify@version

再启动 dsh web

怎么确认可用

  1. 插件页里打开 识图,详情上方出现识图设置
  2. 给不能看图的模型发一张图:界面里缩略图还在;模型调用 analyze_image 而不是 read_image
  3. 给不能看图的模型发本地图片路径或图片URL:应直接调用 analyze_image,不会先 read_image
  4. 给能看图的模型发一张图:模型直接回答,不调用 analyze_image
  5. 给能看图的模型发本地图片路径或图片URL:应直接调用 read_image,不会先 analyze_image

给不能看图的模型发图,模型调用 analyze_image

配置

插件页保存后立即生效。识图字段写在该插件的 Loader 配置里,也就是 $DSH_HOME/profiles/name/cordis.patch.yml(0.1.x 写在 settings.yaml 的 image-pathify 段,不会自动导入,需要在插件页重新填写);API 密钥仍写在 $DSH_HOME/.credentials.yaml。

选项 默认 做什么
apiKeyEnv IMAGE_PATHIFY_API_KEY 凭据引用名。密钥本身写在 $DSH_HOME/.credentials.yaml,不进设置文件
visionModel deepseek-flash 识图模型 id。
visionBaseUrl https://api.deepseek.com OpenAI 兼容基址。(部分地址需要后面加/v1)
disableThinking true 默认勾选。仅 DeepSeek 等支持 thinking 的接口会带上该字段,如果需要思考和详细输出请取消勾选,并增大输出上限,防止输出内容被截断(思考也会占用tokens)
maxTokens 2048 输出上限。0 = 不传 max_tokens(不传时各家默认值处理方式并不统一)
models 空 = 全部不能看图的模型 只决定哪些模型允许发图。空 = 都能发。填了就只放行名单里的模型
relaxAdmission true 允许给不能看图的模型发图。关闭后按模型能力拒绝贴图

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev agentshim 下一个 Next dsh-finance-plugins →