DSH Plugin Store
Back to home

TiankunDai

dsh-vision-LMstudio

让你能通过deepseek harness调用LM studio加载的本地视觉模型

Stars
1
Language
TypeScript
Created
Aug 13, 2026
Updated
Aug 13, 2026
Vision
GitHub repo

Introduction

dsh-vision-LMstudio

Local LM Studio vision recognition plugin for DSH (DeepSeek Harness) Web GUI — recognize, describe, and OCR local images or clipboard screenshots with a local vision model. All inference happens on your own machine; images never leave it.

本插件为 DSH(DeepSeek Harness)Web GUI 提供本地 LM Studio 视觉识别能力:连接 LM Studio 的 OpenAI 兼容接口(默认 http://127.0.0.1:1234), 调用其视觉模型对本地图片与 Windows 剪贴板图片做识别、描述与 OCR,图片不出本机。

Features

  • Agent tools (registered host-side, available in every session)
    • lmstudio_vision — recognize a local image file by absolute path
    • lmstudio_clipboard — recognize the current clipboard image (screenshot / copied image), no file path needed
    • lmstudio_models — list loaded models with vision-capability labels
  • Settings panel:「设置 → LM Studio 视觉识别」— configure server URL / model / default prompt / temperature / max tokens, refresh the model list, and one-click recognize a local image or the clipboard
  • Automatic model selection — without an explicit model, picks gemma-3/4 → other vision models → other non-embedding models in that order (prefers google/gemma-4-31b-qat for accuracy; minicpm-class models are not recommended)
  • Persistent config~/.dsh/dsh-lmstudio-vision.json (atomic writes), shared by the panel and the agent tools

Requirements

  • DSH (DeepSeek Harness) with the web profile
  • LM Studio with a vision model loaded and the local server started (Developer → Start Server, default port 1234)
  • Windows for the clipboard tool (uses Windows PowerShell 5.1 Get-Clipboard -Format Image)

Install

pnpm install
pnpm build
dsh plugin --profile web add link:<path-to-this-repo>/packages/dsh-lmstudio-vision

Then restart DSH (dsh web) and refresh the page. dsh plugin appends the package to dsh.profile.bundles automatically (the package declares dsh.bundle).

安装后重启 DSH 并刷新页面:设置页出现「LM Studio 视觉识别」面板,三个 agent 工具随宿主 常驻,任何会话都可用。

Configuration

Configurable from the settings panel or by editing ~/.dsh/dsh-lmstudio-vision.json:

{
  "baseUrl": "http://127.0.0.1:1234",
  "model": "",
  "prompt": "请详细描述这张图片的内容。",
  "temperature": 0.2,
  "maxTokens": 1024
}

Repository layout

  • packages/dsh-lmstudio-vision/src/index.ts — host half: LM Studio engine, API routes, agent tools, system-prompt announcement
  • packages/dsh-lmstudio-vision/src/client/ — browser half: the settings panel
  • packages/dsh-lmstudio-vision/cordis.patch.yml — bundle patch plugin row
  • shared/tsdown.client.ts — build preset (follows the dsh-web-ui clientBundle convention)

License

BSD-3-Clause