DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
L

dsh-llm-pi-ai-image-offload

Llm Pi Ai Image Offload

恢复 pi-ai 路由的 request-image 令牌计价,使 dsh-spill-policy 能够卸载过大的 base64 图像,避免超出上下文窗口。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add github:ender-candle/dsh-llm-pi-ai-image-offload#f5e152629aa86ba61835bb48c716489c16a3f6c8
README兼容性版本

兼容性与来源证明

Llm Pi Ai Image Offload 以 dsh-llm-pi-ai-image-offload 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/11/1

版本

0.1.0stable
2026/11/1

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/11/1
查看源码 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Experimental Cot Translation Bundle@deepseek-ai/dsh-experimental-cot-translation-bundle扩展推理的实验性机器翻译Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Our Free Model@ebony-vinyl/dsh-our-free-modelOur Free Model — 在 dsh 里装上这个插件即可,无需登录、注册或填 API Key,就能使用包括 DeepSeek V4.1 Flash、Kimi K3 在内的前沿模型,桌面端另有 EAC 协付渠道;2.0 起接入 LobsterAI、Qoder、TRAE、Cline、Loomy、Raccoon、MiniMax、ZCode、Gemini 十个账号渠道(原有匿名免费通道保留)(登录、账号池、积分领取、本地 OpenAI 网关与局域网转发、数据看板与运行日志),六页毛玻璃界面统一呈现。Usage@linxin666/dsh-usage用于 dsh Web GUI 的使用统计插件:检测各提供商的余额和编程套餐配额,并实时记录令牌使用情况;侧边栏 Settings 行上方显示紧凑的价格概览卡片

README

dsh-llm-pi-ai-image-offload

中文文档:README.zh-CN.md

Restores request-image token pricing for adapter routes that declare none — in practice every route served by @deepseek-ai/dsh-llm-pi-ai.

Naming: the package is called image-offload after the capability it restores, not after the method it patches. The patched method is imageRequestPricing, whose job is to price an image in tokens so the budget checks can compare it against maxInlineTokens and offload what does not fit. "Pricing" here is token accounting, not billing.

The bug this fixes

LlmAdapter.imageRequestPricing() returns undefined by default, meaning "this route declares no image pricing". Only dsh-llm-deepseek overrides it. pi-ai does not.

@deepseek-ai/dsh-spill-policy asks for that calculator whenever a tool result carries images:

const calculator = ctx.get("llm")?.imageRequestPricing(provider, model);
if (calculator === undefined) throw new Error("the current model has no image token calculator");

That throw is caught by the plugin's own outer try, which logs spill-policy: ...; keeping the inline content and returns nothing. The tool result therefore stays completely inline: a multi-megabyte base64 image goes to the provider verbatim and consumes the context window.

@deepseek-ai/dsh-token-meter degrades the same way, falling back to a fixed structural heuristic instead of pricing the bytes actually sent.

What this plugin does

It installs imageRequestPricing on adapter instances that return no pricing, and re-applies on every llm/adapters-updated event.

  • An adapter that answers real pricing keeps it (an upstream fix retires this patch automatically).
  • An adapter whose implementation throws is never replaced.
  • Zero runtime dependencies, so it cannot fail to resolve host packages at load time. The descriptor helpers are reproduced byte-for-byte from the shipped implementation, and the integration test asserts that equality against the real @deepseek-ai/dsh-llm.

Pricing model

These routes publish no vision-token accounting, so each occurrence is priced by the bytes actually transmitted for it:

transmitted = min(attachment.bytes, imageRequestTarget(...).maxBytes)
visualTokens = ceil(base64Length(transmitted) / charsPerToken)

base64Length(b) = ceil(b / 3) * 4, matching the harness's own byte accounting. This is the same unit spill-policy compares against maxInlineTokens, which is what lets it shed an oversized image instead of keeping it inline.

For the reported failure case — a 2048×2048 JPEG at 1,266,320 bytes on a route with a 1 MiB request budget — that is base64(1048576) / 4 = 349,526 tokens, comfortably above the default maxInlineTokens: 12500.

Config

All fields optional.

fielddefaultmeaning
enabledtrueturn the patch off entirely
charsPerToken4base64 character density per token
maxVisualTokens400000per-occurrence ceiling
providers(all)allowlist of provider route ids
debugfalselog each patched route to the harness logger

Example profile patch:

- id: llm-pi-ai-image-offload
  name: dsh-llm-pi-ai-image-offload
  config:
    debug: true

What the model sees

Shedding does not delete the image from the session, and does not touch the workspace file. The model receives spill-policy's notice plus a path it can re-read with read_image, so the image is recoverable rather than lost.

Verifying it is active

The harness logger writes to an in-memory ring buffer that has no file sink, so a warn is not observable after the fact. Use debug: true plus a large generated image, and check the session log for image/offload events — before this patch that signal never appears.

Install

From GitHub (recommended)

dsh plugin --profile <profile> add github:ender-candle/dsh-llm-pi-ai-image-offload

Pin a commit for a reproducible install:

dsh plugin --profile <profile> add github:ender-candle/dsh-llm-pi-ai-image-offload#<sha>

From a local checkout

dsh plugin --profile <profile> add /absolute/path/to/dsh-llm-pi-ai-image-offload

Then activate the bundle

Either install path puts the package in the profile's node_modules. Add the name to dsh.profile.bundles in the profile package.json:

{
  "dsh": {
    "profile": {
      "bundles": ["...", "dsh-llm-pi-ai-image-offload"]
    }
  }
}

The bundle's own cordis.patch.yml inserts the host row, so no manual patch editing is needed. Restart the harness afterwards — bundles load at startup.

dsh plugin add writes both package.json and pnpm-lock.yaml, so the install stays consistent with the profile's package manager state.

Tests

node test/offload.test.mjs      # 18 unit checks, no dependencies

The plugin has zero runtime dependencies, so the unit test runs anywhere. A separate integration check (not shipped) runs against host modules extracted from app.asar and asserts the descriptor text is byte-identical to the shipped requestImageHandleText / offloadedImageText serializers.

Risks

  • LlmAdapter instance fields are not a documented extension point. If the registry shape changes, the patch silently does nothing — by design, since a missing patch restores exactly the pre-existing behaviour.
  • The estimate over-counts routes whose upstream tokenizes as vision. That is conservative on purpose: it triggers shedding earlier, never later. Provider usage remains the authoritative accounting anchor.