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-media-input

v1.1.4

Published

Audio/video model input for DeepSeek Harness: injects per-model audio/video switches into the official Models settings provider cards and registers OpenAI-compatible provider routes whose adapter turns attached media files into input_audio / video_url wir

Readme

Media Input(音视频输入)

让支持音视频的模型能真正吃到你附加的音频/视频文件 —— 把「能力开关」注入官方 设置 → 模型 的服务商卡片,而不是另起一个藏起来的小页面。

它解决什么问题

DSH 官方的模型设置页只声明文本/图片输入(inputModalities / input), 其 wire 层也带不动媒体。本插件不碰任何公共契约:会话日志里始终是普通的 file 块,只有在本插件注册的路由上,请求构建阶段才把媒体句柄(handle 文本) 还原成 input_audio / video_url 请求体片段。

  • MiMo 方言(api.mimo.mi.com 自动判定):视频片段额外带 fps 与 media_resolution。
  • openai 通用方言:其余 OpenAI 兼容网关的标准写法。
  • 没有媒体能力的网关保持完全一样的官方行为,媒体文件仍走官方 handle 文本路径。

两个界面

1. 官方服务商卡片里的「媒体输入(音视频)」(新增,1.1.0)

注册到官方槽 settings.models.provider-card(keyed,ownerProps { provider, configured, keyConfigured })。在该槽里,宿主用 entryKey = provider.settingsNs 派发 —— 注意它是服务商族的 settings 命名空间, 不是路由 id;所有 pi-ai 路由共用一个命名空间,因此一次注册即可出现在每张 pi-ai 服务商卡片里。本插件覆盖官方三大族:

| key | 覆盖范围 | |---|---| | llm-pi-ai | 全部 pi-ai 目录路由与手工声明的路由 | | llm-deepseek | 官方 DeepSeek API-key 路由 | | llm-deepseek-account | 官方 DeepSeek 账号路由 |

卡片里你会看到:

  • 该服务商是否已有媒体路由;
  • 模型级 音频/视频 开关(从该服务商自己的 settings 命名空间读取模型清单);
  • 若读不到模型清单 → 退化为单一「为该服务商启用音视频」开关 + 说明;
  • 任何改动都走 点击 → 警告/说明确认 → 写入,取消即丢弃。

安全:只写入本插件自己的 providers 配置;从不复制、从不明文保存密钥 —— 只沿用官方凭据的环境变量名(apiKeyEnv)。不改动官方卡片本身。

2. 本插件行上的配置页(1.0.x 已有,保留)

「插件 → dsh-media-input → 媒体输入」里的完整编辑器:手动增删媒体路由、方言、 fps/分辨率、每个模型的音频/视频。1.1.0 起底部新增只读状态区:列出已注册路由 及其方言解析结果,便于排查。

配置形状(static Config)

providers:
  - route: mimo                 # 会话里选择的 route 名
    baseURL: https://api.mimo.mi.com/v1
    apiKeyEnv: MIMO_API_KEY     # 只存环境变量名,不存密钥
    dialect: auto               # auto(按地址判定)| openai | mimo
    videoFps: 2
    mediaResolution: default
    models:
      - id: mimo-v2.6-flash
        name: MiMo v2.6 Flash
        supportsAudio: true
        supportsVideo: true

dialect: auto 时:MiMo 官方主机 → mimo,其余地址 → openai;显式配置优先。

给其它插件的服务

ctx.get('mediaInput').capabilities(provider, model) // { audio, video } | undefined
ctx.get('mediaInput').describeRoutes()              // 已注册路由与解析后的方言

English

Registers OpenAI-compatible media routes and injects per-model audio/video switches into the official Models settings provider cards (settings.models.provider-card). The slot dispatches by the provider's settings namespace (llm-pi-ai / llm-deepseek / llm-deepseek-account), so one registration per family appears inside every provider card. Writes only touch this plugin's own providers config, always behind a click → confirmation → mutate flow, and never copy or store keys (only the credential env-var name). An OpenAI-compatible adapter turns attached audio/video files into input_audio / video_url wire parts at request time (the MiMo dialect adds fps and media_resolution); session logs keep plain file blocks, so no public contract changes.

License: MIT. Author: jd962.