Sorwcyra/ds-vision-plugin0

ds-vision-plugin

DSH 自动网页图转文与视觉 OCR 工具插件

AI 分析

提供多模型竞速的图转文、视觉理解和 OCR 工具,支持 GLM 和 Agnes 等模型。适合需要高精度、多通道视觉识别和 OCR 辅助主模型理解图片的用户。

包名
ds-vision-plugin
版本
0.3.0
许可证
MIT
最近更新
2026年8月14日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Sorwcyra/ds-vision-plugin

Configuration CLI

After installation, create the default four-model race and inspect missing keys:

& "$env:USERPROFILE\.dsh\profiles\web\node_modules\.bin\ds-vision.cmd" configure
& "$env:USERPROFILE\.dsh\profiles\web\node_modules\.bin\ds-vision.cmd" status

Save GLM or Agnes keys interactively on Windows (input is masked):

& "$env:USERPROFILE\.dsh\profiles\web\node_modules\.bin\ds-vision.cmd" key glm
& "$env:USERPROFILE\.dsh\profiles\web\node_modules\.bin\ds-vision.cmd" key agnes-2.5-flash

One GLM_API_KEY enables both GLM models; one AGNES_API_KEY enables both Agnes models. Channels with missing keys are skipped immediately.

Run one live race and print the winning model:

& "$env:USERPROFILE\.dsh\profiles\web\node_modules\.bin\ds-vision.cmd" verify --image "C:\path\test.png"

Add any OpenAI-compatible model without editing YAML:

& "$env:USERPROFILE\.dsh\profiles\web\node_modules\.bin\ds-vision.cmd" add `
  --id my-vlm --base-url "https://example.com/v1/chat/completions" `
  --model "your-vision-model" --api-key-env "MY_VLM_API_KEY" --pool fallback

Use --pool race for concurrent first-success selection or --pool fallback for ordered use after the four defaults. The generated default is ~/.dsh/ds-vision/vision.yml; DS_VISION_CONFIG can override it.

Linux/macOS:

export DS_VISION_CONFIG=/absolute/path/to/vision.yml
export GLM_API_KEY=...
export AGNES_API_KEY=...
dsh web

Windows PowerShell:

$env:DS_VISION_CONFIG = 'C:\absolute\path\to\vision.yml'
$env:GLM_API_KEY = '...'
$env:AGNES_API_KEY = '...'
dsh web

Automatic attachment settings

The bundle patch accepts these environment overrides:

VariableDefaultMeaning
DS_VISION_AUTO_CONVERTtrueSet to false to disable automatic Web attachment conversion.
DS_VISION_AUTO_PROVIDERSdeepseek-officialComma-separated primary provider routes. Empty in a custom patch means all providers.
DS_VISION_AUTO_INTENTautoauto, reason, or ocr. Auto selects OCR when the request asks for text extraction.
DS_VISION_AUTO_FAILURE_MODEannotateannotate replaces a failed image with a visible error marker; error fails the step.

For advanced overrides (autoPrompt, autoComplex, autoAccurateOcr), replace the complete ds-vision row config in the profile's cordis.patch.yml; Harness patch layers replace row configs rather than deep-merging them.