DeepSeek Harness 插件

dsh-quota-router

Policy-only multi-source quota router for DeepSeek Harness: deterministic task profiles, ordered candidate chains, health-aware fallback, and observable decisions.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
Liyuk/dsh-quota-router
最近更新
2026年8月21日
分类
模型与服务商
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/Liyuk/dsh-quota-router
插件名:dsh-quota-router
作者:Liyuk

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-quota-router

![npm](https://www.npmjs.com/package/@liyuk/dsh-quota-router)

A policy-only multi-source model router for DeepSeek Harness.

v1.0.0 makes the routing contract explicit: choose the right DSH-native model source for each task, recover from infrastructure failures in a bounded and explainable way, and measure route usage without claiming unproven token savings.

npm install @liyuk/dsh-quota-router

📖 [项目详解(能力 / 边界 / 收益)→ docs/PROJECT.md](./docs/PROJECT.md) · [工程设计与算法文章 → docs/blog-quota-router-engineering.md](./docs/blog-quota-router-engineering.md)

It routes a user message to a named task profile, then selects the first healthy, auto-eligible source on that profile's candidate chain. The chain is built from a global source priority list (sources) combined with a per-task model mapping (profiles[].modelBySource) — two orthogonal dimensions. This is designed for a "cost-source 薅羊毛" workflow across mixed free / subscription / unlimited / low-price / manual emergency model sources.

Why it exists

A normal keyword → target + fallback Router cannot reliably express:

coding:      opencode-go/mimo-v2.5 → token-share/gpt-5.6-luna
hard coding: opencode-go/mimo-v2.5 → token-share/gpt-5.6-terra

Both rules have the same primary route, so a fallback inferred only from the current session header loses the original task identity. quota-router retains profile + candidate identity per turn and moves along that exact chain.

Safety model

  • Only DSH-native registered providers/models are used; no adapters or credentials are owned here.
  • Global sources.priority is the only source-order authority; sourceTier is explanatory metadata, never a hidden reorder rule.
  • manual and emergency candidates are never selected automatically; paid candidates require the explicit allowPaidFallback: true opt-in.
  • Stable quota/auth failures advance immediately; transient failures respect normal retries until a configurable threshold opens a cooldown.
  • Context compaction is configured and triggered independently by DSH; this plugin never rewrites session history.
  • If all candidates are exhausted, the original failure path remains intact.

See [docs/configuration.md](./docs/configuration.md) for every editable policy field, [docs/strategy.md](./docs/strategy.md) for multi-source/task-decomposition recommendations, [docs/task-aware-routing-plan.md](./docs/task-aware-routing-plan.md) for the task-aware API, and [examples/quota-router.example.yaml](./examples/quota-router.example.yaml) for a safe starting configuration. The task-aware layer narrows quota-router to model selection for already-split subtasks; it does not add a Planner, tool lazy-loading, context compaction, or cross-Harness orchestration. [REQUIREMENTS.md](./REQUIREMENTS.md) is the implementation and state-machine reference.

Settings page

With the package enabled in a DSH Web profile, Settings → Quota Router opens the dedicated configuration page. It edits the live quota-router settings namespace and provides:

  • global retry, cooldown, and ledger controls;
  • global source priority editing;
  • profile keyword and modelBySource editing;
  • an expanded source-chain/fallback preview.

The page previews configuration only. Native provider/model availability, active cooldowns, route decisions, and usage stay host-side; inspect runtime observability through the read-only quota_router_status tool.

Development

pnpm install
pnpm test
pnpm run check
pnpm run build

Published on npm as @liyuk/dsh-quota-router; source lives at Liyuk/dsh-quota-router. See [docs/RELEASE-1.0.0.md](./docs/RELEASE-1.0.0.md) for the community-facing update.