DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Connect Modelscope Token Plan — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
C

dsh-connect-modelscope-token-plan

Connect Modelscope Token Plan

ModelScope (modelscope.cn) connect bundle for the Harness Web UI: the official Magicube balance plus, for calls made through this plugin, per-model counts, a daily trend, and a 429 error event list on the Plugins-page panel, plus a default-off switch that registers ModelScope models as a DSH LLM pro

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:eghrhegpe/dsh-connect-modelscope-token-plan#8981898b0e84b85fee50bff7ffc220a0b422dd88
READMECompatibilityVersions

Description

ModelScope (modelscope.cn) connect bundle for the Harness Web UI: the official Magicube balance plus, for calls made through this plugin, per-model counts, a daily trend, and a 429 error event list on the Plugins-page panel, plus a default-off switch that registers ModelScope models as a DSH LLM provider.

Compatibility and provenance

Connect Modelscope Token Plan is published as dsh-connect-modelscope-token-plan and currently resolves to version 0.2.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
10/5/2026

Versions

0.2.0stable
10/5/2026

Related plugins

Loading related plugins…

Latest
0.2.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
10/16/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in models-usage.

Whale Widgetdsh-whale-widgetDeepSeek balance whale widget in the bottom-right corner of the DSH Web interface: balance/today’s usage/peak-off-peak pricing, customizable bubble click sequence (text/balance/today/peak-off-peak/image/random phrases and parallel weighted selection), per-line styles and fonts, floating quick editinUsage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with a compact price glance card above the sidebar's Settings rowClient Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilitiesPer-model capability declarations (image input and reasoning efforts) for custom pi-ai providers, edited in place on the Models settings cards; writes the official llm-pi-ai settings namespace, no DSH source changes.Codex Subscriptiondsh-codex-subscriptionUse ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast mode

README

dsh-connect-modelscope-token-plan

把魔搭社区(modelscope.cn)API-Inference 免费额度的本地用量面板接入 DeepSeek Harness 的 Plugins 页(插件卡内联,三个 tab:额度 / 模型 / 接入),并可选把魔搭注册成 DSH 的 LLM provider(id modelscope-token-plan,直连 apiBase,OpenAI 兼容)——注册后魔搭模型进入 DSH 模型选择器,可直接对话调用。见 docs/PROVIDER-M4.md。

姊妹插件:dsh-connect-sensenova-token-plan、dsh-connect-agnes-token-plan(同族结构,受控复制)。

状态:M4 已落地(provider 注册 + 面板「接入为 DSH 模型」),离线测试与 typecheck/build 全绿。

面板长什么样

三个 tab:额度 / 模型 / 接入。

「额度」tab——头条是官方魔粒余额(真实值),下面接本地调用分布:

「额度」tab:魔粒余额与本地调用

「模型」tab——一行一个魔搭模型,可勾选启用;开关打开即把魔搭注册为 DSH provider:

「模型」tab:接入为DSH 模型与模型清单

三条事实(写代码前先认清)

  1. 官方有「魔粒」余额端点:GET {siteBase}/openapi/v1/magicubes/balance(Bearer 访问令牌,匿名 401),返回 {success, data:{total_balance, available_balance, frozen_amount}}(2026-10-04 实测,见 docs/SPIKE.md)。推理响应本身仍不带任何额度头。

  2. 本地计数是辅助口径:面板头条是官方魔粒余额;本地计数只回答官方余额答不了的问题——按模型分布、本地趋势、429 事件流(只统计经本插件的调用,直连魔搭的其它客户端不计入)。次数口径的「推算剩余/参考上限」已从面板移除(官方改魔粒计费后两个单位并排是误导),相应的 dailyQuotaTotal / dailyQuotaPerModel 两个社区快照常数也从配置里一并删除了——面板不消费它们,留着只会让人以为能算「还剩几次」。

  3. 凭据只有一把静态钥匙:魔搭访问令牌(个人中心生成,形如 ms-…),无 OIDC、无密码、无 refresh。默认读 DSH 凭据服务已有的 MODELSCOPE_API_KEY 引用;MODELSCOPE_API_KEY 环境变量只在启动时读一次,且优先级高于存储值(坑见下段);令牌永不入日志、永不进插件目录。

    凭据分层有个坑(2026-10-05 实测):DSH 凭据服务的优先级里,启动时的环境快照压过存储文件,而那个快照在启动时冻结(不是活的 process.env)。两个后果:①在 DSH 启动之后改环境变量——包括 Windows 用户级变量——不会被看见,改完必须完全重启 DSH(退出全部 DeepSeek Harness 进程,不只是关窗口)才进快照;②重启让环境变量生效后,它会反过来压过面板里保存的值,而面板仍显示「已保存」。最省事的做法是直接在面板里保存令牌(立即生效,且不依赖重启)。

免费额度怎么算(2026-10 快照,以官方为准)

  • 每日免费调用次数按账户计(当前约 2000 次/天,需绑定阿里云 + 实名;规则多次调整过);
  • 单模型另有每日上限(社区数据约 500 次/天)与每分钟限频;
  • 额度按天重置;耗尽返回 429。
  • /v1/models 免认证可读,不消耗额度。

上面这些数字来自社区公开信息,非官方数据,官方调整后需手动更新本节;它们只用于解释 「额度怎么算」,不参与任何计算——面板不消费次数上限,「还剩几次」算不出来(见下节)。

文档地图

何时查
「上游到底有没有额度信号」docs/SPIKE.md(实测记录 + 结论)
provider 怎么接入(写代码前)docs/PROVIDER-M4.md(实现契约)
这版是怎么做出来的、踩过什么坑docs/IMPLEMENTATION.md(实施过程档案)
上游端点全景 / 第三方方案对比docs/REFERENCES.md、docs/REFERENCE-modelsdev.md
v1 要做什么、做到哪了docs/ROADMAP.md
Host/Client 两半怎么分docs/PROVIDER-M4.md(§14 红线)+ docs/IMPLEMENTATION.md;本仓库暂无独立的 ARCHITECTURE.md
开发者校验工具(变异测试 / 覆盖率)tools/dev/README.md;发布流程见 RELEASING.md

诚实声明

  • 面板头条是官方魔粒余额(真实值);本地计数只统计经本插件的调用——它回答的是分布/趋势/429 事件流,不是余额,直连魔搭的其它客户端不计入。注册 provider 之后,DSH 的全部魔搭调用都经本插件,所以本地计数覆盖全部 DSH 魔搭调用。次数口径的「推算剩余」已从面板移除(官方改魔粒计费后两单位并排是误导),相应地quota.daily 只剩 usedLocal 一个数——没有 limit,也没有推算出的「剩余」。
  • 本地计数的口径与 harness 全局账本不同,且刻意不合并。DSH 自己有 @linxin666/dsh-usage,按 days→provider→model 记成功调用的 token;它只订阅 session 的 assistant/message,失败调用一次都不记。所以本插件只做两件全局账本答不了的事:①「经本插件的调用分布与趋势」;②429/错误事件流——这是本插件的独家数据(官方只给总额度余额,不给「哪个模型刚才在限频」)。成功的 token 总量不在此重复记账(详见 src/host/usage-observer.ts 文件头)。
  • 429/错误事件的分类读的是 llm-error-fix 重分类之后的 code:被误判成 QUOTA 的 rpm 限频在事件流里记作 rate_limit,与退避策略说同一件事。观察层套在重分类层之外,顺序不可反。
  • 计数口径:每次流结束记一次 call,含失败、含用户中断(魔搭按次数计费,限频掉的请求同样是一次调用);token 数上游没给时是 null 而非 0。偏差方向是按流计次:重试不在流内部发生,而是在流消费完后由 agent/request-error 瀑布决定重发,因而每次重试各记一次——按「魔搭按次数计费」的口径这反而是对的(每次重发都真打了一次上游)。
  • provider 默认关(opt-in,与姊妹插件一致):面板「模型」tab 的「接入为 DSH 模型」开关翻转即生效,面板保存值优先于 cordis.patch.yml 的 registerProvider 默认。
  • 已知限制:reasoning 恒为 false。魔搭 API-Inference 是多模型代理,是否吃 reasoning_effort 取决于背后那个模型,本插件保守默认不发该参数(模型用自己的默认),也不提供思考强度选择器。原理由「发错档位会整条请求 400」已在 2026-10-05 真机探测中证伪:reasoning_effort 传 "bogus" 同样返回 200,值不被校验。真实障碍是无法区分「生效」与「静默忽略」(都是 200),且该端点会在真响应与空壳 200 之间摇摆——档位表做不出来,不是没做。见 docs/PROVIDER-M4.md §4。
  • 429 响应形状未实测(不值得烧额度去触发),解析按 OpenAI 惯例兼容,漂移时面板会给 shapeWarnings。
  • 面板「模型」tab 的每个模型都外链到其魔搭详情页(https://www.modelscope.cn/models/{owner}/{model}):魔粒单价只在网页展示、不在官方 API,所以这只是一个人工核对用的跳转,不是数据源(「为什么没有按模型消耗 API」见 docs/REFERENCES.md)。