MacilyDots/dsh-image-count-guard ↗★ 0
dsh-image-count-guard
Recover a DSH visual-model session when an upstream gateway rejects a request for carrying too many images: offload the oldest image occurrences to text placeholders and retry the step. 适合在使用多模态视觉模型时,频繁因发送图片过多导致接口报错请求失败的场景。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:MacilyDots/dsh-image-count-guardドキュメント
README 全文を読む ↗Configuration (optional)
No configuration is needed by default. When you do need it, override by id in the profile's cordis.patch.yml:
- id: image-count-guard
config:
defaultImageLimit: 20 # assumed limit when the error text gives no number
safetyMargin: 2 # margin kept after offloading, so adding one more image does not fail again
maxOffloadPerRetry: 80 # maximum number of images omitted per retry