npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-image

v0.3.0

Published

DeepSeek Harness 插件:注册声明支持 image 的 provider「deepseek-vision」(显示为「多模态LLMs」),把图片先转成文字再交给纯文本的 DeepSeek;转图用的多模态 provider/model 可在设置页配置。

Readme

dsh-image

让纯文本的 DeepSeek 也能「读图」的 DeepSeek Harness 插件。

原理

DeepSeek 官方适配器(deepseek-official/deepseek-v4-pro)只声明 text 输入,所以发图片会被「当前模型不支持图片」拦下。

本插件注册一个对外声明支持 image 的新 provider,在选择器里显示为 「多模态LLMs」

| 字段 | 值 | | --- | --- | | provider | deepseek-vision | | model | deepseek-v4-pro-vision | | 显示名 | 多模态LLMs |

当请求消息里含图片时,它会:

  1. 先用用户配置的多模态模型(默认 Moonshot moonshotai/kimi-k2.5)把图片转成文字描述
  2. 再把这段纯文字请求转发给真正的 DeepSeekdeepseek-official/deepseek-v4-pro)。

于是 DeepSeek 适配器永远只看到文字,不会再抛「不支持图片」;图片准入检查也自然通过(这个 provider 声明了 image),read_image 读文件图同样可用。

配置(可 Tweak 的 UI)

转图所用的多模态 provider/model 不再写死在代码里,改在 Web 界面的「设置 → 多模态LLMs」页面配置:

  • Provider / Model 两个下拉框,选项来自已注册的多模态 providerllm-pi-ai 段)及其模型;
  • 选择结果持久化在 settings.yamlvision-bridge: 命名空间(热加载,保存后下一次请求即生效);
  • API Key 仍由 settings + credentials 提供llm-pi-ai.providers.<provider>.apiKeyEnv.credentials.yaml),本插件不接触任何密钥。

一键添加推荐 provider

页面下半部分内置了三个推荐的多模态 provider,填入 API Key 点「添加」即可(写入 llm-pi-ai.providers.<key> + 本机 credentials,随即出现在上面的 Provider 下拉框):

| Provider | baseURL | 模型 | 说明 | | --- | --- | --- | --- | | 智谱 GLM (BigModel) | https://open.bigmodel.cn/api/paas/v4 | glm-4.6v-flash(免费)/ glm-4.6v(付费) | 128K 上下文、视觉推理,注册拿 key 即用 | | 阿里百炼 DashScope | https://dashscope.aliyuncs.com/compatible-mode/v1 | qwen3-vl-flash / qwen3.7-plus / qwen3.8-max | 最便宜 VL 线,高精度 OCR;GUI 截图用 3.7-plus,难图用 3.8-max | | 火山豆包 (Ark) | https://ark.cn-beijing.volces.com/api/v3 | doubao-seed-2-1-turbo-260628 | Ark 模型 ID 带日期后缀,短名会 404 |

对应的 API Key 环境变量名:ZHIPU_API_KEY / DASHSCOPE_API_KEY / ARK_API_KEY

默认值(组合 base)为 moonshotai / kimi-k2.5,即 Moonshot 的 Kimi K2.5(支持 text + image)。

安装

作为宿主(host)插件装进你的 profile。以 web profile 为例:

dsh plugin --profile web add dsh-image

若手动安装:

  1. 把本包放进 profile 的 pnpm workspace(如 ~/.dsh/profiles/web/packages/dsh-image);
  2. pnpm-workspace.yaml 里加上 packages/dsh-image
  3. 在 profile 的 package.json 依赖里加 "dsh-image": "workspace:*"
  4. cordis.patch.yml 里插入一行:
- insert:
    - id: dsh-image
      name: dsh-image
  1. cd ~/.dsh/profiles/web && pnpm install,然后重启 DSH。

客户端半部(lib/client.js + dsh.client)由 Web 组合的模块系统(dsh-client-modules)扫描 exports["./client"] 自动挂载;@deepseek-ai/schemastery@deepseek-ai/dsh-settings 通过 $DSH_HOME/profiles/node_modules 的平铺回退目录解析(已在 peerDependencies 中声明)。

使用

重启后:

  1. 在「设置 → 模型」里确认已配置好一个多模态 provider(如 Moonshot)并填入 API Key;
  2. 到「设置 → 多模态LLMs」选择要用的 provider + model,点保存;
  3. 在会话顶部的模型选择器里选 「多模态LLMs」deepseek-vision / deepseek-v4-pro-vision),或把它设为默认模型;
  4. 直接发图即可:图片会被自动转成文字交给 DeepSeek。

发布

npm publish

发布前请按需:

  • 改包名 / 加 scope(name 字段);
  • 确认 versiondescriptionlicense
  • 若改动了对 DSH 包的依赖(@deepseek-ai/schemastery@deepseek-ai/dsh-settings),在 peerDependencies 里同步对应版本。

已知边界 / 后续

  • 图片描述是「先转文字再交给 DeepSeek」,因此对图片里精确的文字/图表细节,识别精度取决于所配置的视觉模型。
  • 转图 provider/model 下拉列表来自 llm.models 的宿主目录(排除了 deepseek-vision 自身与纯文本的 deepseek-official);是否真的支持 image 由所选 provider 决定,选到不支持图片的模型时,转图会以「图片描述失败」降级为占位文字。
  • 设置页当前只做保存/回读,不含 provider/model 列表的实时推送刷新;改动 provider 后重新打开页面即重新拉取。
  • settings 命名空间暴露机制:DSH 的 web 配置 API(settings.describe/settings.update)只对「可配置 provider 的 settingsNs + 内置白名单」开放,白名单硬编码在 shipped 的 apiproxy 包里、第三方插件无法扩展(官方注释标注为 deferred work)。本插件因此用 llm.registerConfigurableProviders()vision-bridge 挂进目录来暴露它;副作用是「设置 → 模型」页会把 deepseek-vision 这一行渲染成一张「unknown family」卡片(模型页按 llm-pi-ai/llm-deepseek 两个命名空间识别编辑布局),但不影响「设置 → 多模态LLMs」页的读写。等官方支持 settings.register() 暴露后,可去掉这个目录注册。