dsh-free-tier-router: Synthesizing multi-platform free LLM quotas into an auto-switchable channel pool

Preface

When developing agents in DeepSeek Harness (DSH), model invocation often requires integrating multiple upstreams. Free quotas are scattered across various platforms, and issues like rate limiting, insufficient balances, or capability mismatches (image recognition, tool calling) can interrupt sessions. Manually switching keys or models, or rolling your own failover logic in scripts, incurs high maintenance costs and is prone to pitfalls—such as scenarios where “a pure text channel receives an image yet returns a 200 status with fabricated content.”

Below is an introduction to the community plugin dsh-free-tier-router (maintainer: EiyoV). It mounts a self-contained proxy kernel within DSH, consolidating free channels (and those you configure manually) from multiple platforms into a pool. It performs capability-based filtering, sorts by measured token cost, and automatically falls back on failure. The SkillHub directory lists the version as v1.0.0, and the repository license is MIT (subject to SkillHub sync metadata).

What is this

dsh-free-tier-router is a plugin package for the DSH Web profile (dsh.client.platform is web in package.json). It automatically mounts the Host and Settings-side UI via cordis.patch.yml. In one sentence, it is a multi-platform LLM channel pool with a built-in proxy—it does not register accounts for you or “generate quotas,” but rather organizes your existing keys and platform free quotas into a routing layer that is observable, supports circuit breaking, and allows automatic switching.

Compared to “just modifying a single provider configuration in DSH,” it additionally provides channel health checks, cooldowns, soft/hard quota thresholds, panel-based operations, and rules for selecting channels based on request morphology (images, tools).

Core Features

The following capabilities are derived from the repository README (synced via the SkillHub readme interface, verifiable as of 2026-10-21).

Channel Pool and Failover

  • The embedded proxy maintains a channel list, switching to the next candidate upon request failure and setting a cooldown for failed channels.
  • The default proxy listens on 127.0.0.1:8787; if an llm-router is already running on that port, the plugin reuses it instead of starting a duplicate instance (as per the README).

Channel Selection by Task

  1. Request with images → Selects only channels that declare image capability.
  2. Request with tools → Selects only channels that support tool calling.
  3. Channels marked as manualOnly do not participate in automatic routing in auto mode, avoiding accidental usage of paid lines.

Quota Circuit Breaking and Priority

  • Soft Threshold (default softRatio 0.9): The channel is moved to the back of the queue; quota is not exhausted, but it is no longer prioritized.
  • Hard Threshold (default hardRatio 1.0): The channel is disabled and will not be selected even as a fallback.
  • Information sources prioritize platform self-reports (e.g., remaining tokens in response headers, OpenRouter balance API) over local cumulative data (~/.dsh/llm-router/usage.json).
  • “Probe and optimize priority” reorders priority based on the total_tokens of the same probe request (can be executed separately via node lib/probe.mjs --tune).

Operations Panel and API

After installation and DSH restart, you can manage via “Settings → Channel Pool” or visit /llm-router. The Host side provides /api/llm-router/* endpoints (e.g., status, catalog, action, save-key). The panel supports viewing cooldowns, errors, cumulative tokens, pasting and saving keys, clearing cooldowns, and discovering zero-price models on OpenRouter.

What it explicitly does NOT do

The README emphasizes: it does not generate free quotas, does not handle registration, and does not perform risk control evasion. Rotating free quotas across multiple accounts may violate platform terms of service; risks are assumed by the user. Multiple keys for the same account share the quota; only different accounts may have independent quotas.

Installation and Activation

Recommendations before installation: The plugin runs with the permissions of the current DSH process and will read/write configurations and keys under ~/.dsh/llm-router/. Please review the GitHub repository source code and the MIT license first. Node requirement is >=20 (manifest engines).

Method 1: Reproducible installation provided by SkillHub directory (web profile)

The install-plan command provided by SkillHub for EiyoV/dsh-free-tier-router (including the exact commit) is as follows. Before execution, you can review the package.json’s dsh.bundle.patch and lifecycle scripts according to the steps in the plan.

dsh plugin --profile web add github:eiyov/dsh-free-tier-router#1871a0a90bd89e2d70c4d77a442013dde013c495

After completion, start or restart:

dsh --profile web

And confirm that the plugin line is loaded without startup errors.

Method 2: GitHub installation from README (profile name can be replaced)

dsh plugin --profile <your-profile-name> add github:EiyoV/dsh-free-tier-router

The README notes: Do not use dsh plugin add for the desktop profile (the CLI will reject it; desktop is managed exclusively by Electron). Installation should use the DSH-bundled pnpm environment.

Method 3: Offline zip package

  1. Obtain dsh-free-tier-router-1.0.0.zip (from the project dist-package/ or via local node dsh-plugin/pack.mjs).
  2. Extract and execute node install.mjs within the directory.
  3. Restart DSH and fill in keys on the panel.

Configuration and keys default to ~/.dsh/llm-router/ (config.json, .env, catalog.json, usage.json, etc.), generated from built-in templates on first run.

Typical Usage

After the installation and restart described above, follow this sequence to implement.

  1. Open the Channel Pool Panel
    “Settings → Channel Pool”, or visit http://127.0.0.1:19387/llm-router in your browser (address from README; if the port differs from the patch, refer to your local cordis.patch.yml / config.json).

  2. Fill in Platform API Keys
    The panel supports direct pasting and saving; you can also edit ~/.dsh/llm-router/.env.

  3. Configure Quota Circuit Breaking (Optional)
    Set limits for channels in config.json, for example:

   "limits": { "tokens": 1000000, "window": "90d", "softRatio": 0.9, "hardRatio": 1.0 }

Old configurations with only note remain unchanged; see docs/CONFIG.md in the repo for full fields.

  1. Multiple Keys for Same Channel (Multi-account Scenarios)
    The README provides auxiliary script examples:
   node add-account.mjs qianfan-text "bce-v3/ALTAK-xxx/yyy"
   node add-account.mjs --list

On 401/403/429 errors, keys in apiKeyEnvs will be rotated within the same channel.

  1. Tune Priority
   node lib/probe.mjs --tune

Reorders priority based on measured token costs; manualOnly channels do not participate.

For development debugging, you can run a smoke test (no key required):

node dsh-plugin\test\smoke.mjs

Use Cases and Precautions

Who is it for

  • Developers who have claimed free or trial quotas on multiple platforms and want unified routing and automatic failover in DSH.
  • Scenarios requiring selection of upstreams based on “image recognition / tool calling” capabilities, with the desire to observe cooldowns and usage on a panel.

Must Note

  • The plugin cannot replace the registration and compliant usage on each platform; for paid channels, be sure to use manualOnly or explicit providerId::model to avoid automatic fallback incurring charges.
  • Local usage only counts traffic passing through this proxy; if DSH connects directly to upstreams, circuit breaking statistics may be incomplete (as stated in the README).
  • Declarations of capabilities in config.json must be accurate to avoid sending images to pure text channels.
  • The community directory SkillHub Plugin Page and GitHub have no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem itself is “everything is a plugin,” please assess trust boundaries yourself.

Conclusion

dsh-free-tier-router consolidates fragmented free LLM channels into a routing pool with circuit breaking and task awareness, providing a Web settings panel and local data directories. It is suitable for reducing the cost of manual model switching when running agents long-term in DSH. Installation commands should follow the SkillHub install-plan or README; functional details and boundaries are authoritatively sourced from the repository README.

  • Directory Page: https://www.skillhub.cn/plugins/EiyoV/dsh-free-tier-router
  • GitHub: https://github.com/EiyoV/dsh-free-tier-router
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye