DeepSeek Harness Plugin

masknull/dsh-qoder-connect

Stars ★ 75 Downloads (30d) 5,267 Category Models & Providers Added 2026-10-20 npm dsh-qoder-connect

Connects Qoder (China and Global) subscriptions to DSH through personal access tokens, keeping each variant on its own credentials and catalog, with saved-token switching, sidebar quota cards, per-model toggles, a context-window preference and a daily check-in.

Install

# from npm (prebuilt)

dsh plugin --profile web add dsh-qoder-connect

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:masknull/dsh-qoder-connect

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

[!WARNING] Qoder's recent giveaways are all rotten — it's queueing or rate-limiting every time, and I no longer use Qoder myself. Responses to issues and PRs may be slower; I may only check the repo or mail once every day or two.

English | 简体中文

A DeepSeek Harness (DSH) plugin that brings your Qoder subscription models into DSH through a Personal Access Token (PAT). One plugin serves both Qoder product lines — each with its own settings card, provider id, credential file and saved catalog, never mixed:

Variant Provider id Card title Where the PAT is minted
China (国内版) qoder Qoder qoder.com.cn
International (国际版) qoder-global Qoder Global qoder.com

Configure only what you use: a variant with no saved PAT shows no model group and never interferes with the other one. Streaming, reasoning content and tool calls ride the plugin's built-in Qoder transport; the conversation loop, compaction and permissions stay Harness-owned.

Features

  • Multiple PATs, switched by hand — each variant keeps a list of saved PATs and the card offers a select to choose the active one. Switching only changes the signing token: model toggles, context-window preferences, check-in and sidebar-quota settings are one shared configuration per variant and never follow the account. Add PAT, Remove current and Clear all manage the list; saving validates first, and removing or switching never touches another account's saved catalog or probe records.
  • PAT: save it and it works — paste a PAT into the card and press Save; the token is validated live against that variant's region before anything is written, and the model group appears immediately — no DSH restart. A mistyped paste can never strand a working credential.
  • Two independent variants — qoder (china) and qoder-global (global) keep separate credential files, routes and saved catalogs: a token minted on qoder.com does not work against the China deployment and vice versa.
  • Three-tier model catalog (live → saved → fallback) — the card states where the list on screen came from: “Model list updated …” (fetched now), “Showing the saved model list from …” (this account's last successful fetch, restored after a restart or a failed fetch), or “Showing the built-in model list (not yet updated from Qoder)” (the roster compiled into the plugin). The reason of the most recent failed fetch is shown too, and the card's Refresh action re-reads the status and re-fetches the model list.
  • One-toggle context window — each variant card's Context window tab lists every model's capacity (the default and the largest declared window) and carries its own “Use the largest declared context window” preference (on by default): on, requests declare the maximum (e.g. Qwen3.8-Max at 1M); off, the default (200K). The two variants keep independent toggle state.
  • Model visibility toggles & batch controls — each variant card provides a dedicated Model Toggles tab (between Context window and Credit details) to freely enable or hide individual models; disabled models are hidden from the DSH model picker, keeping it tidy; includes instant search by name/ID and one-click Enable all / Disable all batch operations.
  • Daily auto check-in & logs — claims the daily 100 Credits automatically for every saved PAT, at a time you can set per variant on the card (10:00 UTC+8 by default, the upstream's reset moment), with independent toggles and startup catch-up protection. The card features a dedicated Check-in log panel with per-account audit trails, Check in now, Refresh, and Clear logs quick actions.
  • Sidebar quota card + credit details — the “Qoder sidebar display” card toggles a per-variant sidebar quota widget (off by default; each toggle needs its variant's PAT saved) with one shared refresh interval (default 5 min, minimum 1 min). Clicking the sidebar widget opens the Qoder quota panel: one row per credit package — “Remaining / Total + bar | Expires” — where a campaign grant (the international edition’s SOTA Exclusive Credits, for one) keeps its own upstream-given title and its own expiry. When the account reports no overall deadline (the upstream’s year-9999 sentinel), the panel states when the PAT was authorized rather than a fabricated date. Click the same widget again to close; click the other to switch variants.
  • Rate display x<priceFactor> — each model name is suffixed with the upstream-reported price multiplier (e.g. Some Model · x0.79, free is x0), spelled x<n> from the catalog's price_factor. Display only — it never changes the request; models whose rate the upstream did not report simply show no suffix.
  • Upstream queue hints are honored — when Qoder answers a queued or throttled request (401/403/429 body) with retryAfterSeconds, the plugin turns it into a local Retry-After header and hands it to DSH as failure.providerRetryAfterMs; the host retry engine can then wait until the moment the upstream asked for, instead of hammering the same still-closed window with its local backoff.

Screenshots

Sidebar quota widgets & credit details

Once enabled on the “Qoder sidebar display” card, a per-variant quota widget sits at the sidebar's foot; clicking it opens the Qoder quota panel with one row per credit package, switchable between the two variants at any time.

China (after clicking the sidebar widget):

China sidebar quota details

International (after clicking the sidebar widget):

International sidebar quota details

Sidebar toggles

The “Qoder sidebar display” card controls both widgets' visibility and the shared refresh interval:

Sidebar display toggles

Settings inside the Plugins panel

The same Qoder settings card has a second home: sidebar → Plugins panel → Installed → the Qoder 连接器 card. Open the card's detail page and the full configuration sits between the description and the component list — PAT, per-variant switches, context windows, model toggles, check-in and sidebar-quota settings, identical to the Settings → Plugin settings card (both surfaces share one configuration). On hosts that do not declare the seat (older DSH), only the Settings entry exists and nothing else changes.

Picking a model in a session

Once a PAT is saved, the model picker gains a Qoder group with per-model rate multipliers (x0.5, x0, …):

Model picker in a session

Context-window settings

Each variant card's Context window tab lists capacities per model under the “Use the largest declared context window” preference:

China:

China context-window settings

International:

International context-window settings

Model toggles & batch controls

Both variant cards provide a Model Toggles tab (located between Context window and Credit details): search models on the fly, toggle individual models on or off, and use Enable all / Disable all batch buttons; hidden models will not appear in the session model picker.

Model toggles & batch controls

Daily Auto Check-In & Check-In Log

Enable daily automatic check-in in the settings card and set each variant's own moment (10:00 UTC+8 by default), then inspect check-in history logs, trigger a manual check-in, or clear logs in the Check-in log tab:

Daily Auto Check-In & Check-In Log

Install

Prerequisites:

  • DSH core 0.2.1-rc.1 or newer (this plugin peers on the @deepseek-ai/* >=0.2.1-rc.1 line);
  • Node.js ^22.19.0 || >=24.0.0 (per package.json engines);
  • your own Qoder account and at least one Personal Access Token.
# From GitHub (recommended)
dsh plugin --profile web add github:masknull/dsh-qoder-connect
# Or from npm
dsh plugin --profile web add dsh-qoder-connect

Swap the --profile value for the profile you use (web / desktop / tui, e.g. dsh plugin --profile desktop add dsh-qoder-connect) — data stays inside that profile, so web / desktop / tui never collide. On a terminal-only profile (TUI) there is no browser card: manage the PAT and check status through the bundled CLI instead; the settings card and sidebar widgets require Web or Desktop.

DSH older than 0.2.1-rc.1? Use v0.2.5 instead — the last release on the 0.1.7 line (DSH ≥ 0.1.7-rc.1):

# From GitHub (recommended, pin the tag)
dsh plugin --profile web add github:masknull/dsh-qoder-connect#v0.2.5
# Or from npm
dsh plugin --profile web add dsh-qoder-connect@0.2.5

DSH older than 0.1.7-rc.1? Use v0.2.0 instead — the last release supporting the 0.1.5 line (DSH ≥ 0.1.5-rc.2):

# From GitHub (recommended, pin the tag)
dsh plugin --profile web add github:masknull/dsh-qoder-connect#v0.2.0
# Or from npm
dsh plugin --profile web add dsh-qoder-connect@0.2.0

Upgrading from 0.1.5? Newer releases removed the automatic migration of the old host's settings.yaml. To carry your old configuration over, migrate through v0.1.9 (the first release with the data migration) first, then upgrade.

Configuration

Mint a PAT

  • Qoder (China): sign in at qoder.com.cn → account settings → Personal Access Token, then copy it. Open the page
  • Qoder Global: sign in at qoder.com → account settings → Personal Access Token, then copy it. Open the page

(The card repeats the same guidance: “Generate a PAT in your qoder.com account settings (Account → Personal Access Token), then paste it here.”)

Save and switch on the card

DSH → Settings → Plugin Settings (插件设置) → the Qoder card: paste the PAT into the password field and press Save (“Validating and saving…” while it runs). The token is validated against that variant's region first — a refusal saves nothing and the card says “That PAT was rejected — generate a new one in your account settings and try again.”

Each variant can hold several PATs: once a second one is saved, the account row shows a select — choosing an entry switches to it. Add PAT appends another (with an optional local-only label), Remove current deletes only the active one, and Clear all empties the list. Configuration is shared: model toggles, context-window preferences, check-in time and sidebar-quota settings belong to the variant, not to the account, and switching never changes them. Quota and the check-in time setting act on the active account. Check-in itself runs per account: the daily sweep and Check in now both walk every PAT saved for the variant and claim each one's benefit for the day, with no switching required. Check-in history is kept per variant and marked per account — the Account column names the token each row belongs to. If the day's automatic run has already happened when a new PAT is added, Check in now claims it. Do this on both cards to run both groups side by side.

Command line (optional)

On a terminal-only profile the CLI manages the same list (--provider defaults to qoder):

dsh-qoder-connect pat set <token> --provider qoder   # validate, save, and activate
dsh-qoder-connect pat list --provider qoder          # list saved tokens (* = active)
dsh-qoder-connect pat use <id> --provider qoder      # switch
dsh-qoder-connect pat rm <id> --provider qoder       # remove
dsh-qoder-connect pat clear --provider qoder         # remove all (logout is an alias)

Environment-variable fallback

For headless setups, the plugin reads an environment fallback only when no credential file exists:

Variant Environment variable
qoder (china) QODER_CN_PERSONAL_ACCESS_TOKEN
qoder-global QODER_PERSONAL_ACCESS_TOKEN

The precedence is file > env: as soon as a valid credential file is saved, a stray environment token stops mattering (the saved token always wins). Env-sourced credentials show as source: environment variable on the card, with no saved-at time.

Data & privacy

File layout

Everything the plugin owns lives in one data directory: <profile>/.dsh-qoder-connect/ — credentials at the root, rebuildable caches under state/ (so “clear the cache” can never touch a credential):

<profile>/.dsh-qoder-connect/
├── .qoder-auth.json              # China PAT list ({version:3, activeId, credentials:[{id,pat,region,savedAt,label?}]})
├── .qoder-global-auth.json       # Global PAT list
├── checkin-status.json           # check-in status and history logs (per account: the `accounts` map keys each credential id)
└── state/
    ├── .qoder-catalog.json       # China per-account saved catalog
    ├── .qoder-global-catalog.json
    ├── .qoder-probe.json         # China reasoning-effort probe records
    ├── .qoder-global-probe.json
    ├── .qoder-host-heartbeat.json    # host heartbeat (doctor uses it)
    └── .qoder-machine-id         # transport machine-id seed (never written to ~/.qoder)

The directory follows the profile that declares this plugin (found under $DSH_HOME/profiles/), falling back to the Harness home when none can be determined; DSH_QODER_DATA_DIR overrides it explicitly.

Development

pnpm install
pnpm run build      # tsdown → lib/ (host bundle + client bundle)
pnpm test           # vitest run (tests/**/*.spec.ts)
pnpm run test:qoder # node --test (tests/qoder/*.test.ts, the Qoder transport suite)
pnpm run typecheck  # tsc across the host and client tsconfigs
pnpm run check      # typecheck + test + test:qoder + build in one gate

The upstream node:test suite for the Qoder transport layer now lives in tests/qoder/ (run it with pnpm run test:qoder; the pristine reference-qoder-tests/ copy has been removed) — package.json scripts are the source of truth.

Provenance & license

Released under the MIT license; see NOTICE for the upstream attributions. This is a community adapter — not affiliated with, authorized by, or endorsed by Qoder or DeepSeek, and not an official implementation.

Disclaimer

  • Qoder's endpoints come from the upstream repositories: upstream may change, rate-limit or block them at any time, breaking part or all of this plugin with no compatibility window to promise.
  • For personal learning and research only; this tool drives your own Qoder account. Do not use it commercially or beyond reasonable personal use. You are responsible for complying with Qoder's terms of service and for any consequence — account restriction, quota loss, service interruption — of using this project.
  • The authors are not liable for any direct or indirect loss arising from use or misuse of this project. The names Qoder, DeepSeek and related marks belong to their respective owners and appear here only to describe compatibility.

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.