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

@henlii/dsh-vision-fallback

v0.1.0

Published

DSH plugin: when the main model cannot accept images, fall back to a configured vision model for that request. Configure the fallback chain in the plugin settings card.

Readme

dsh-vision-fallback

主模型不支持图片输入时,自动回退到配置的视觉模型处理该轮请求。

背景

dsh 的会话模型(agent-default-model)可能是不支持图片的文本模型(如 deepseek-v4-flash)。用户发送带图片的消息时,官方适配器直接报 this model does not support image input,会话中断。

本插件在 agent/request waterfall(每次 LLM 请求的模型选择点)拦截:请求 消息含图片且当前模型不是配置的视觉模型时,把该轮请求切换到视觉模型。

安装

dsh plugin --profile web add /path/to/dsh-plugins/plugins/dsh-vision-fallback

$DSH_HOME/profiles/web/cordis.patch.yml 加:

- insert:
    - id: vision-fallback
      name: 'dsh-vision-fallback'
      config: {}

配置

在 Web 设置 → 插件配置 → dsh-vision-fallback 卡片:

  1. 勾选「启用视觉回退」;
  2. 选择供应商(内置 catalog 中声明支持 image 的模型,如 deepseek-official);
  3. 选择视觉模型(如 deepseek-v4-flash-vision-exp);
  4. 保存。

配置写入 settings.yamldsh-vision-fallback 命名空间:

dsh-vision-fallback:
  enabled: true
  provider: cpa
  model: deepseek-v4-flash-vision-exp

行为

  • 仅当请求消息(含 tool-result 嵌套)含图片时切换;
  • 已是配置的视觉模型时不重复切换;
  • 视觉模型不支持 reasoningEffort 时自动去掉该字段,避免 prepareCall 拒绝;
  • 视觉模型不可用(解析失败)时保持原模型,不中断请求。

已知取舍

  • 切换是每轮请求级的:含图片的轮次走视觉模型,纯文本轮次仍走主模型。
  • 会话请求头会记录切换后的模型(request/header reason=change),便于审计。