Dalizi2026/dsh-factory-provider

把 Factory (Droid) 订阅额度接入 DeepSeek Harness (DSH) 的原生 LLM provider 插件 · Factory (Droid) subscription quota as native DSH providers

Project Overview项目介绍

dsh-factory-provider is a cordis plugin purpose-built for DeepSeek Harness (DSH). Installation is performed by cloning the repository to any local directory and running dsh plugin --profile desktop add link:<path>; the link: prefix mounts the directory directly, so source edits only take effect after restarting DSH. No droid CLI is required, and the package runs cross-platform on macOS, Linux, and Windows. Internally the plugin opens a loopback-only gateway on 127.0.0.1 that bridges a user's Factory (Droid) subscription quota into DSH, registering three providers (factory-g, factory-a, factory-o) so that GLM, Claude, GPT, Kimi, Qwen, Nemotron, and other upstream models appear in the DSH model selector with their official thinking-intensity values already populated.

The typical workflow starts at https://app.factory.ai/settings/api-keys, where the user creates a long-lived fk-… API key and copies it once. After installing the plugin link and restarting DSH, the user opens Settings → Factory (Droid) → Account & API Key, pastes the key, and clicks Save & Use without any further restart. Connection status then displays the API-key badge together with token validity, organization id, and provider-write state; pressing Test Connection sends a real 16-token probe and reports the upstream status. Finally, the user trims the surfaced model list on the Routes & Models panel via per-model checkboxes (Save is in the collapsed header) and restarts DSH once so the rebuilt catalog is picked up at runtime. The plugin is aimed at developers who already pay for a Factory (Droid) subscription and want to reuse that quota in the DSH desktop client instead of opening a separate model bill.

Credentials live locally under ~/.dsh-factory-provider/accounts/<id>/api-key (or %USERPROFILE%\.dsh-factory-provider\accounts\<id>\api-key on Windows) with 0600 file mode and 0700 directory mode; they are never written to DSH settings, never logged, and never transmitted to any third party. The diagnostic log journal.jsonl records request shapes, upstream status codes, and short prompt excerpts (system start 300 chars, first user message 200 chars, full upstream error body) but no tokens or complete payloads. Verified on DSH 0.2.0-rc.2 (macOS desktop); earlier or newer DSH versions are untested and may lack the webServer, settings.installSection, schemastery .volatile(), or loader/volatile-update hooks the plugin depends on, in which case it logs the missing interface rather than failing silently. License is MIT, the project is an unofficial third-party plugin unaffiliated with Factory, and usage patterns such as multi-account rotation are at the user's own risk under the Factory terms of service. Offline test suite: node test/run.mjs runs 65 checks covering the account vault, request scrubbing, model catalog, loopback guard, settings lifecycle, uninstall rollback, and end-to-end gateway streaming including SSE, disconnect cancellation, and 401 retry.

dsh-factory-provider 是一个为 DeepSeek Harness(DSH)打造的 cordis 插件,安装方式是把仓库 clone 到本地任意目录后执行 dsh plugin --profile desktop add link:<本地路径>,其中 link: 表示直接引用本地目录、改完源码需重启 DSH 才能生效;它不依赖 droid CLI,跨平台运行(macOS / Linux / Windows)。插件在 127.0.0.1 上开一个只监听本机的回环网关,把 Factory(Droid)的订阅额度接入 DSH,让 GLM、Claude、GPT、Kimi、Qwen、Nemotron 等模型直接出现在 DSH 的模型选择器里。

典型使用流程:先在 app.factory.ai 申请一把 fk-… API key(无需安装 droid CLI),装好插件重启 DSH,再在「设置 → Factory (Droid) → 账号与 API key」里粘入 key 并「保存并使用」,随后点「测试连接」验证全链路 200,最后在设置页的「路由与模型」里按需勾选要保留的模型,保存后需重启一次以刷新运行中的目录。适合已经订阅 Factory(Droid),希望把现有额度在 DSH 桌面端复用、而又不想再额外付一份模型账单的开发者。

凭据以 0600 权限写入 ~/.dsh-factory-provider/accounts/<id>/api-key(Windows 路径对应 %USERPROFILE%),不写进 DSH 设置文件、不进日志、不上传第三方;诊断日志 journal.jsonl 会记录请求形态、上游状态码以及便于排障的提示词片段。已实测 DSH 0.2.0-rc.2 macOS 桌面版,更早或更新版本未测试,部分模型存在地区门禁(已被剔除);项目为 MIT 许可的非官方第三方插件,与 Factory 无隶属关系,多账号轮换等用法风险自负。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 7 stars - very few users, little community feedback星标只有 7,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:Dalizi2026/dsh-factory-provider

把 Dalizi2026/dsh-factory-provider 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-factory-provider

把 Factory(Droid)的订阅额度接入 DeepSeek Harness(DSH),让你在 DSH 里直接选用 Factory 的模型——GLM、Claude、GPT、Kimi、Qwen、Nemotron 等,走你自己的订阅额度。

零构建:装完即用,不需要编译。

免责声明:本项目是非官方的第三方插件,与 Factory 无隶属关系。它用你自己的 Factory API key 访问 Factory 服务,属于个人使用场景。请遵守 Factory 服务条款,多账号轮换等用法风险自负。


目录


它做什么

DSH 本身不认 Factory。这个插件在中间架了一座只监听本机的桥:

DSH(模型选择器)
   ↓
llm-pi-ai  provider 条目(factory-g / factory-a / factory-o)
   ↓
本插件在本机开的回环网关(127.0.0.1)
   ↓  自动附加你选的 Factory API key + 官方 CLI 头集合
Factory 推理服务(prem.factory.ai)

于是 Factory 的模型会直接出现在 DSH 的模型选择器里,和内置模型一样选用。你只需要一个 Factory API key(第 1 步),用掉的是你的 Factory 订阅额度。

三条路由分别对接不同的上游协议:

路由 覆盖模型 额度池
factory-g GLM / Kimi / MiniMax / DeepSeek 等 Core 池模型(倍率低,但同样先扣标准额度)
factory-a Claude 全系(Opus / Sonnet / Fable) 标准订阅额度
factory-o GPT / Codex 系 标准订阅额度

支持的 DSH 版本

已验证 DeepSeek Harness 0.2.0-rc.2(macOS 桌面版,实测通过)
更早版本 未测试 —— 接口可能不存在,见下表
更新版本 未测试 —— 若接口有变动,插件会记日志而不是静默失败

查自己的版本:

dsh --version

插件依赖的 DSH 接口

这些是插件与 DSH 的接触面。缺哪个,对应功能就失效 —— 插件会在日志里写明原因,不会静默出错。

接口 用途 缺失时的表现
ctx.inject(["webServer", "settings"]) 取得 web 端口与设置服务 插件不注册任何路由,日志:webServer/port unavailable
webServer.register(route) 注册回环网关与设置页接口 同上
settings.installSection(ctx, ns, schema, entry, hooks) 注册设置页 自动降级到 settings.register
settings.describe() / settings.mutate(ns, ops, revision) 写入 provider 配置 provider 写不进去 → 模型列表为空,日志:provider reconcile failed
schemastery 的 .volatile() 让设置项可写 保存设置报 has no volatile fields
ctx.emit("loader/volatile-update") 通知 DSH 重建模型目录 模型能用,但选择器可能要重启才刷新

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-plugin-call-me 下一个 Next dsh-peak-block →