Back to home@ct-jyjntc

dsh-model-modality

DSH plugin: declare whether a configured third-party model accepts image (multimodal) input

Stars
0
Language
JavaScript
Created
Sep 7, 2026
Updated
Sep 7, 2026
GitHub repo

Introduction

dsh-model-modality

DeepSeek Harness 插件:声明第三方模型(中转站 / 自定义提供方)是否支持图像(多模态)输入

它做什么

DSH 运行时对图像的门禁(消息图片、read_image 工具、附件上传、子代理图像提示)都依赖模型元数据中的 inputModalities。本插件让用户直接声明某模型的输入模态,并把声明写入拥有该模型的提供方设置:

  • llm-deepseek(官方 / 自定义 baseURL)→ models[].inputModalities
  • llm-pi-ai(第三方提供方目录)→ models[].inputmodelOverrides[].input

写入后立即通过 llm.resolveModelInfo 校验,因此声明生效后:

  • 该模型可以接收图片消息(不再被 Model does not support image input 拦截);
  • read_image 等图像工具被放行;
  • 底层流调用不再把图片投影成文本。

声明的持久化位于提供方自己的设置(DSH 的 Models 设置页可查看/编辑),与插件本身互不影响。

安装

dsh plugin add ct-jyjntc/dsh-model-modality

安装后可用两个工具(对话中直接让 agent 调用):

  • declare_model_multimodal(provider, model, supportsImage) — 声明某模型是否支持图像输入,返回写入与校验结果;
  • list_model_multimodal(provider?, model?) — 列出各可配置提供方模型的输入模态。

浏览器端 UI(可选)

设置 → 模型 → 每张提供方卡片内的「多模态(图像输入)」开关,以及 Run 卡片面板,需要会话级动态插件挂载(客户端模块未随本包发布)。需要时让 agent 挂载即可。

示例

declare_model_multimodal(provider="raincode", model="kimi-k3", supportsImage=true)
→ { ok: true, verified: true, inputModalities: ["text","image"], ... }

License

MIT