ysr666/dsh-vision-router
ysr666/dsh-vision-router为纯文本 Agent 提供视觉能力:内置免 Key 视觉链 + 像素级视觉工具(看图问答、定位、裁剪、像素对比、取色、OCR、矢量化、抠图、截图);粘贴图片即可用。
Agent 可调用的视觉工具:通过你配置的任意 OpenAI 兼容视觉端点描述本地图片,支持多模型交叉核对,不内置任何密钥。
A vision tool for DeepSeek Harness agents: sends a local image to the OpenAI-compatible vision endpoint you configure and returns a text description — for when the current session model can't ingest images directly.
The plugin ships no built-in defaults: provider (baseURL), credentials, and models are all configured at install time. If configuration is incomplete the plugin loads normally but does not register the tool (log line shows what's missing) — it can never crash the host.
vision image_path=/tmp/shot.png/chat/completions endpoint (vendor-agnostic)apiKey → apiKeyEnv (environment variable) → ~/.dsh/.credentials.yaml same-name keycross_check=true) to guard against hallucinated descriptionsmaxTokens / maxImageBytes limits (optional)curl subprocess — inherits host proxy env vars and avoids Cloudflare 403/1010 on default urllib/undici user agentstar xzf dsh-vision-tool-install.tar.gz && cd dsh-vision-tool-install
# interactive: just run it and answer the prompts
bash install.sh --restart
# or parameterized (scriptable / repeatable deploys)
bash install.sh --restart \
--vision-base-url https://example.com/v1 \
--vision-api-key-env MY_VISION_KEY \
--vision-model gpt-4o \
--vision-models gpt-4o,qwen-vl-max,kimi-latest \
--vision-max-tokens 2000
dsh plugin --profile web add dsh-vision-tool
# then configure: edit the dsh-vision-tool config section in ~/.dsh/profiles/web/cordis.patch.yml
--vision-*)| Parameter | Required | Meaning |
|---|---|---|
--vision-base-url | ✅ | OpenAI-compatible chat/completions endpoint |
--vision-model | ✅ | Default vision model |
--vision-api-key | one of | API key inline |
--vision-api-key-env | one of | Environment variable name (also tried as a key in ~/.dsh/.credentials.yaml) |
--vision-models | optional | Cross-check model list (comma-separated; needed for cross_check=true) |
--vision-max-tokens | optional | Omitted from the request if not set |
No parameters + interactive terminal → guided prompts. No parameters + non-interactive → empty config written (tool not registered); re-run with parameters, or edit the config section in
~/.dsh/profiles/web/cordis.patch.yml.
vision image_path=/tmp/shot.png
vision image_path=/tmp/shot.png question="What text is in this image?"
vision image_path=/tmp/shot.png model=gpt-4o
vision image_path=/tmp/shot.png cross_check=true # requires --vision-models configured at install
~/.dsh/.credentials.yaml should be chmod 600[dsh-vision-tool] missing ... — re-run install.sh with --vision-* parameters and restartapiKey / apiKeyEnv (incl. credential-file same-name key)/chat/completions, Authorization: Bearer)--vision-max-tokens 2000 or higherMIT. Chinese documentation: README.zh.md
Part of dsh-plugins — a small monorepo of DSH plugins: dsh-lan-gateway, dsh-vision-tool, dsh-mobile-ui.