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

@l6i/dsh-mimo-vision

v0.1.2

Published

Plug-in vision for text-only DeepSeek models on the opencode-go route, powered by the MiMo V2.5 vision model

Downloads

421

Readme

English | 中文

License Version Node

关于项目

DeepSeek Harness (dsh) 对未声明图片输入模态的模型会直接拒绝图片消息,因此纯文本模型 (如 deepseek-v4-flash)永远无法"看到"粘贴的图片。本插件注册一个包装 provider, 其模型是上游 DeepSeek 模型的纯文本孪生体,但声明支持图片输入。当请求携带图片块时, 每个图片会在请求发出前交给 mimo-v2.5 识别,图片块被识别文本替换,请求再委托给真实的 纯文本模型。

核心特性:

  • 准入放行:选中孪生模型后,粘贴/拖入图片不再被 dsh 拒绝。
  • 日志保真:会话日志保留真实图片块,界面正常显示缩略图;只有发给模型的 wire 消息携带转换文本。
  • 按附件缓存:识别结果按附件缓存(LRU + Promise 去重),同一图片多次出现在上下文中只识别一次。
  • 失败降级:识别失败时降级为说明文本块,不阻塞对话。

快速开始

前置条件

  • 一个 dsh 部署,且配置了 opencode-go 提供方路由(llm-pi-ai 设置,例如 OPENCODE_GO_API_KEY 环境变量)。
  • 该路由提供 deepseek-v4-flash / deepseek-v4-promimo-v2.5 模型。

安装

方式 A — 动态插件(无需落盘文件)

插件源码为 TypeScriptsrc/index.ts),构建产物为 dsh/index.js。将构建产物 (npm run build 生成)中的 Host 代码作为动态 Cordis 插件定义并运行(cordis_define + cordis_run),插件会立即注册包装 provider。

方式 B — dsh 命令安装(持久,推荐)

本包是标准 dsh bundle,一条命令即可安装到某个 profile(与 @liustack/modlens 相同的机制):

# 将 web 换成你的 profile 名(例如 headless)
npx -y @deepseek-ai/dsh plugin --profile web add @l6i/[email protected]

前置条件:包需已发布到 npm(npm publish)。未发布时请先用方式 A,发布后再执行本命令。

重启 dsh,然后验证安装结果:

npx -y @deepseek-ai/dsh plugin --profile web list

也可以自行添加 cordis 行(等价的持久安装方式):

- insert:
    - id: mimo-vision
      name: '@l6i/dsh-mimo-vision'

开发

npm install      # 安装 TypeScript
npm run typecheck  # 类型检查
npm run build      # 编译 src/index.ts → dsh/index.js

使用方法

  1. 打开 dsh Web 界面的模型选择器
  2. 选择新的提供方分组 opencode-go (Mimo Vision)
  3. 选择任意带 "Mimo Vision" 后缀的纯文本模型(如 DeepSeek V4 Flash (Mimo Vision))。
  4. 粘贴 / 拖入一张图片并提问——回复由纯文本模型基于 mimo-v2.5 的识别文本生成。

配置

apply(ctx, config) 接受可选配置对象:

| 键 | 默认值 | 说明 | | --- | --- | --- | | upstream | opencode-go | 持有被包装模型与视觉模型的真实路由 | | visionModel | mimo-v2.5 | 用于图片识别的视觉模型 | | providerId | opencode-go-vision | 在 llm 注册表上注册的包装路由 | | wrapModels | 未设置(自动) | 显式指定被包装的上游模型 id;缺省时自动包装上游路由上所有纯文本模型(视觉模型自动排除) | | providerName | opencode-go (Mimo Vision) | 模型选择器中的分组名 | | modelSuffix | (Mimo Vision) | 附加到包装模型显示名的后缀 | | cacheLimit | 64 | 按附件识别结果的 LRU 上限 | | maxTokens | 8192 | 单次识别调用的输出上限 | | visionPrompt | 内置 | 识别提示词;null 表示使用默认值 |

工作原理

用户粘贴图片 ──► 准入检查(孪生模型声明图片输入)──► 包装 provider 的 stream()
       │
       ├─► 图片块 ──► mimo-v2.5(opencode-go 路由)──► 识别文本
       │
       └─► 消息(图片已替换为文本)──► deepseek-v4-flash ──► 回复

包装适配器以鸭子类型实现 dsh 的 LlmAdapterproviderInfoproviderRetryPolicylistModelsresolveModelstream),并通过 ctx.llm.registerAdapter([providerId], adapter) 注册,因此会出现在模型目录中,并像其它路由一样参与调度。

路线图

  • [ ] 多图批量识别(一次消息中多张图片并行转换)
  • [ ] 识别结果的可视化指示(消息内标记"图片已识别")
  • [ ] 识别提示词可针对场景(截图 / 文档 / 图表)预设
  • [ ] 支持其他视觉模型作为识别引擎

参见开放问题以了解计划中的功能与已知问题。

贡献

欢迎贡献!提交问题或拉取请求时请使用仓库内置的模板:

  • 🐛 Bug 报告(中文优先)
  • 功能需求(中文优先)
  • 英文版模板请在选择器中选用带 "(English)" 的条目

许可证

根据 MIT 许可证分发。

联系方式

项目链接:https://github.com/l6icode/dsh-mimo-vision

致谢

  • modlens — 请求时图片转文本的包装 provider 模式参考
  • DeepSeek Harness — 插件化 agent harness
  • MiMo — 图片识别模型