deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
PROJECT README
Giving text models eyes to see in DeepSeek Harness.
dsh-image-describer is a native plugin for DeepSeek Harness that provides dual-mode visual understanding capabilities for text-only LLMs (such as deepseek-v4-flash, deepseek-v4-pro).
The plugin seamlessly supports two complementary visual interaction scenarios: Direct UI Chat Image Pasting (Attachment Mode) and Active File Inspection (Tool Mode).
┌── Scenario 1: Paste image directly in UI ────➔ Automatically transcribes into structured context
User provides visual input in DSH ──┤
└── Scenario 2: Mention image file in chat ─────➔ Model actively invokes `describe_image` tool
Ctrl + V screenshot paste or drag-and-drop into the chat box.ImageBlock attachment in the user's message.llm/stream pipeline.MiniMax-M3) for OCR and comprehensive visual recognition.ImageBlock with an explicit, structured system prompt:[System Notice: The user uploaded/pasted an image in chat (non-workspace file, fully transcribed by visual model MiniMax-M3). Please answer directly based on the recognition results below, without searching workspace files or calling tools:
<Transcribed visual content and OCR text>
]
"Analyze the microservice architecture in
assets/architecture.png."
"What is the error code in the bottom-left corner ofScreenshot.png?"
describe_image tool:{
"filePath": "assets/architecture.png",
"prompt": "Analyze the service dependencies and data flow in detail."
}
describe_image tool reads the local image file, saves it as an attachment, and calls the vision model.The DSH Web UI and API gateway check whether the current model declares image input modality. To allow pasting images in UI and reading files, declare input: [text, image] in ~/.dsh/settings.yaml:
llm-pi-ai:
providers:
minimax-cn:
apiKeyEnv: MINIMAX_CN_API_KEY
opencode-go:
apiKeyEnv: OPENCODE_GO_API_KEY
modelOverrides: # Override built-in models
deepseek-v4-flash:
input: [text, image]
deepseek-v4-pro:
input: [text, image]
opencode-go2:
apiKeyEnv: OPENCODE_GO2_API_KEY
api: openai-completions
baseURL: https://opencode.ai/zen/go/v1
models:
- id: deepseek-v4-flash
input: [text, image]
- id: deepseek-v4-pro
input: [text, image]
pnpm install
pnpm run build # tsc builds to lib/
# Add this plugin to web profile
npx @deepseek-ai/dsh plugin --profile web add ./dsh-image-describer
# Start DSH Web
dsh web --profile web
npx @deepseek-ai/dsh plugin --profile web remove dsh-image-describer
Configure the plugin in your profile's cordis.patch.yml:
- insert:
- id: image-describer-tool
name: dsh-image-describer
inject: [tools, llm, attachments]
config:
provider: minimax-cn # Multimodal provider route
model: MiniMax-M3 # Vision model ID (must support image input)
maxTokens: 2048 # Max output tokens per description
timeoutMs: 60000 # Timeout in milliseconds
| Option | Type | Default | Description |
|---|---|---|---|
provider |
string |
minimax-cn |
Vision model provider route (configure API key in settings.yaml) |
model |
string |
MiniMax-M3 |
Vision model ID (must support image input) |
prompt |
string |
Chinese detailed prompt | Default prompt used when caller doesn't specify a specific question |
maxTokens |
number |
2048 |
Max output tokens per analysis |
timeoutMs |
number |
60000 |
Analysis timeout in milliseconds |
pnpm run clean # Clean lib/ output
pnpm run build # Compile TypeScript
让纯文本模型也能“看见”世界。
dsh-image-describer 是专为 DeepSeek Harness 打造的原生插件,为 DeepSeek 等纯文本 LLM(如 deepseek-v4-flash、deepseek-v4-pro)提供双模视觉理解能力。
本插件支持两种互补的视觉交互场景:聊天框直接粘贴图片(附件模式) 和 对话中主动调用工具(Tool 模式)。
┌── 场景 1: UI 聊天框直接粘贴图片 ──➔ 自动转写为【结构化上下文】秒出回答
用户在 DeepSeek 中使用图片 ────────┤
└── 场景 2: 对话中提及图片文件 ────➔ 模型主动调用 describe_image 工具进行定向分析
Ctrl + V 粘贴屏幕截图,或把图片拖入输入框发送。ImageBlock)附带在用户消息体中。llm/stream 消息流水线处自动拦截该请求。MiniMax-M3)对图片进行完整的 OCR 文字提取与版面内容理解。ImageBlock 替换为带有明确引导词的系统提示:[系统提示:用户在聊天中直接上传/粘贴了图片(非本地工作区文件,已由视觉模型 MiniMax-M3 完整识别解析)。请直接基于以下识别结果回答用户的问题,无需在本地文件系统中搜索该图片或再次调用工具:
<视觉模型返回的深度内容描述与 OCR 文字>
]
“帮我分析一下项目里的
assets/architecture.png架构图。”
“查看Screenshot.png中左下角的报错代码是什么。”
describe_image 工具调用:{
"filePath": "assets/architecture.png",
"prompt": "详细分析图中的微服务架构及组件依赖关系"
}
describe_image 工具读取工作区本地文件,提交给多模态视觉模型进行针对性分析。DeepSeek Harness 的 Web UI 和 API 网关会在最外层检查模型是否声明了 image 模态。为了让前端允许粘贴图片、文件工具允许读图,需要在全局配置文件 ~/.dsh/settings.yaml 中为你使用的纯文本模型开启声明:
llm-pi-ai:
providers:
minimax-cn:
apiKeyEnv: MINIMAX_CN_API_KEY
opencode-go:
apiKeyEnv: OPENCODE_GO_API_KEY
modelOverrides: # 👈 为内置模型声明模态
deepseek-v4-flash:
input: [text, image]
deepseek-v4-pro:
input: [text, image]
opencode-go2:
apiKeyEnv: OPENCODE_GO2_API_KEY
api: openai-completions
baseURL: https://opencode.ai/zen/go/v1
models:
- id: deepseek-v4-flash
input: [text, image]
- id: deepseek-v4-pro
input: [text, image]
pnpm install
pnpm run build # tsc 编译输出到 lib/ 目录
# 将本插件软链接安装到 DSH web profile
npx @deepseek-ai/dsh plugin --profile web add ./dsh-image-describer
# 启动 DSH
dsh web --profile web
npx @deepseek-ai/dsh plugin --profile web remove dsh-image-describer
在 Profile 的 cordis.patch.yml 中进行声明或覆盖:
- insert:
- id: image-describer-tool
name: dsh-image-describer
inject: [tools, llm, attachments]
config:
provider: minimax-cn # 多模态提供方路由
model: MiniMax-M3 # 视觉模型 ID(必须支持图片输入)
maxTokens: 2048 # 单次图片分析的最大 Token 上限
timeoutMs: 60000 # 单次图片分析超时时间(毫秒)
| 配置字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
provider |
string |
minimax-cn |
视觉描述者 Provider 路由(需在 settings.yaml 中配置 API Key) |
model |
string |
MiniMax-M3 |
视觉描述者模型 ID(必须为支持图像输入的多模态模型) |
prompt |
string |
中文详细描述模板 | 默认分析提示词模板(当调用方未指定具体问题时使用) |
maxTokens |
number |
2048 |
单次图片分析的最大输出 Token 上限 |
timeoutMs |
number |
60000 |
单次图片分析的超时时间(毫秒) |
pnpm run clean # 清空 lib/ 产物
pnpm run build # 重新编译 TypeScript 源码
MIT License
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。