QJAG1024/dsh-model-meta-autofill

DSH插件:从模型元数据注册表(models.dev)自动填充自定义提供商模型的元数据(上下文窗口、输出上限、显示名称、输入模态)。

Project Overview项目介绍

This repository is a native plugin built exclusively for DeepSeek Harness (DSH), designed to automatically populate missing metadata for custom LLM models configured in DSH's llm-pi-ai custom provider settings. It pulls standardized metadata including context window size, maximum output tokens, display name, and input modality from the public Model Metadata Registry at models.dev. The plugin ships with a pre-built offline index of metadata that works immediately after installation, and it can optionally pull the latest updates from the registry on startup or on a set interval. It never overwrites any fields that a user has manually configured, only filling in values for fields that are missing from the user's model configuration.

After installation and restarting the DSH web profile, the plugin adds a dedicated "Model Metadata" section to the DSH settings page. This section lets users view the matching status of every custom model across all custom providers, manually trigger filling for individual models, run a bulk fill of all matched models, and pull a full list of available models directly from a custom OpenAI-compatible gateway to add them to the provider in one click. It also exposes a set of localhost HTTP endpoints that can be called with curl or from browser developer tools for programmatic access to metadata matching and application functionality. Additionally, it exposes a service interface to other DSH plugins that lets them look up model metadata directly.

To install the published release, you can run the command dsh plugin --profile web add dsh-model-meta-autofill in your terminal. To install from source, you need to have pnpm installed, clone the repository, run pnpm install, then pnpm build, create a tarball with npm pack, and install the tarball via the dsh plugin command. The plugin is open source under the permissive MIT license, all development dependencies are available from public npm, so you can modify or build it locally without any extra access requirements. It only targets the llm-pi-ai custom provider settings, and will only fill values that exist in the public metadata registry.

这是一款原生的 DSH 插件,作用是为 llm-pi-ai 设置区中用户自定义配置的大语言模型自动预填元数据,包括上下文长度、输出上限、模型显示名和输入模态,数据来源于 models.dev 的公开模型元数据 registry。它仅填充缺失字段,绝不会覆盖用户手动修改过的配置,默认自带离线索引,也支持启动时自动拉取最新元数据更新索引。安装可通过 npm 命令直接安装发布版,也可本地构建后从压缩包安装。

本插件面向在 DSH 中配置自定义大语言模型供应商的用户,当用户添加或编辑自定义模型时,插件会自动检测缺失的元数据项并完成预填。它还在设置页自带了专门的 Web 交互分区,支持用户查看模型匹配状态、手动触发单模型填充、一键批量覆盖所有匹配模型、调整显示名格式,还能从自定义网关拉取模型列表一键批量添加。同时插件还向其他 DSH 插件暴露了查询索引的服务接口和一组 HTTP API 端点。

本插件采用 MIT 许可开源,开发所需依赖全部来自公开 npm 包,无需额外私有依赖。它仅作用于 llm-pi-ai 自定义供应商设置区,仅填充元数据目录中存在记录的字段,不会对目录未收录的模型猜测数值,用户已配置的字段始终优先于自动填充内容。支持配置定时刷新间隔、添加多个外部元数据源,还提供试运行模式方便调试。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
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-model-meta-autofill

把 QJAG1024/dsh-model-meta-autofill 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-model-meta-autofill

DSH 插件:为自定义供应商(llm-pi-ai 设置区)里配置的模型自动预填元数据——上下文长度(contextWindow)、输出上限(maxTokens)、显示名(name)与输入模态(input)——数据来源为 models.dev(Model Metadata Registry)。

在「Models」页从自定义网关发现(interrogation)出来的模型、或手工录入的模型,通常只有 id。本插件把目录里已知的元数据填回该模型的配置项,让界面可直接查看、也让上游据此做容量调度;已由你手动设置过的字段一律不被覆盖。

工作原理

  1. 离线索引:构建时把 models.dev 目录归一化去重后打进包内(lib/data/models.dev.json),离线立即可用。
  2. 实时刷新(可选,默认开):启动时(及可选定时)拉取最新目录(models.dev/api.json)并合并到索引之上;每个数据源独立失败隔离,失败不影响其余源与离线索引。
  3. 设置写入:插件监听 llm-pi-ai 设置区的变化(模型被采纳/编辑),对「有缺的模型」生成补丁,通过设置管线的 update 写入——这就是「自动预填」。
    • 只填缺失字段,绝不覆盖你设置过的值;
    • 只处理存在于你自己设置层的 provider 路由(组合 base 里仅有的 provider 不会被物化进用户文档);
    • models 列表有改动时整表重述(设置合并对数组是整表替换语义,避免部分列表悄悄丢模型);
    • 写出的文档是幂等的:填完之后没有缺失项,因此不会循环写。
  4. Host 服务:ctx.modelMeta 向其他插件暴露索引与纯函数助手(lookup / stats / refresh / buildSectionPatch)。

说明:fillReasoning(推理属性)为保留开关,默认关闭——各供应商对推理模式的 wire 拼写不同,目录数据没有可移植的通用表达,宁可不动。

安装

插件是**宿主侧(host)**插件,需装入运行 dsh web 的 profile(例如 ~/.dsh/profiles/web)。

从 npm 安装(发布版):

dsh plugin --profile web add dsh-model-meta-autofill

或从源码安装(本地构建):

pnpm install          # 依赖解析需要 ../deepseek-harness checkout(见「开发」)
pnpm build            # 生成 lib/(含打包的 lib/data/*.json)
npm pack              # 产出 tarball
dsh plugin --profile web add dsh-model-meta-autofill@<tarball路径>

cordis.patch.yml(dsh.bundle.patch)会在安装时自动插入一行配置到 profile 的补丁层:

- insert:
    - id: model-meta-autofill
      name: 'dsh-model-meta-autofill'
      config:
        sources: [models.dev]
        refreshOnStart: true
        refreshIntervalMs: 0
        timeoutMs: 15000
        autoApply: true
        dryRun: false
        fillName: true
        fillInput: true
        fillReasoning: false

重启 dsh web(或对应管理面重载插件)后生效。首次运行时若 llm-pi-ai 已存在带模型的 provider,初始扫描会立即补填一次。

Web 界面操作(插件自带)

插件同时带一个客户端 half(dsh.client 声明,走壳的 /plugins 动态加载协议,零改壳代码),样式沿用设置页的设计语言(720px 栏宽、border-l2 细线卡片、胶囊按钮、--dsw-alias-* 令牌)。重启后,设置页出现「模型元数据」分区:

  • 顶部工具栏(靠前位置):**「全部覆盖」主按钮——一次把所有已匹配模型换成 models.dev 的值;旁边是「显示名称携带厂商名」**开关(决定填充的显示名是否写成 xAI: Grok 4.5 这种厂商前缀形式;选择会记住),以及「刷新」与模型/匹配计数;
  • 每个自定义供应商一张卡片,点头部可折叠/展开,带「N 个模型 / 已匹配 M」标签;
  • 卡片内每个模型一行:模型 id(等宽字体)· 当前配置 · models.dev 目录值(随开关实时预览显示名)·「填充」按钮;
  • 目录没有该模型 → 按钮置灰显示「无匹配」;填充未匹配会明确提示「models.dev 没有匹配到:」;写入失败显示宿主返回的具体原因(含孤儿锁提示)。
  • 卡片底部**「获取网关模型」**区块:拉取网关自身的模型列表(见下),勾选后一键添加到该供应商;新加的裸 id 会被自动填充接管。

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

← 上一个 Prev dsh-agent-bus 下一个 Next qixi-plugin →