PATCHES

August 14, 2026 · View on GitHub

The stock DeepSeek adapter (@deepseek-ai/dsh-llm-deepseek) declares every model text-only (inputModalities: ["text"]) and rejects image content. To let users paste/upload images (which then render as [图片附件: sha256:...] markers for the model), apply this small patch to the installed package:

File: node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.js

  1. modelInfo(): inputModalities: ["text"]["text", "image"]
  2. resolveModel() fallback branch: same change
  3. assertTextOnly(): no-op instead of throwing UNSUPPORTED_CONTENT
  4. flattenText(): render image blocks as \n[图片附件: <attachmentId>]

Uploaded images are stored content-addressed at:

$DSH_HOME/attachments/v1/objects/<sha256[:2]>/<sha256>

So [图片附件: sha256:ab12...]$DSH_HOME/attachments/v1/objects/ab/ab12.... Run the vision tool on that path.

Re-apply after any npm install (node_modules gets overwritten). 每次重装依赖后需重新应用本补丁。