Account Relay
English | 简体中文
Account Relay combines model sources already configured in DeepSeek Harness (DSH) into a relay model with shared concurrency limits and per-session routing priorities.
Status and support
This README describes Account Relay 0.5.1 for the DSH web interface. The package declares compatibility with DSH 0.2.3-alpha.3 and later. Relay models advertise text input. The sidebar requires the web interface.
Requirements
- Node.js 22.5 or later, DSH 0.2.3-alpha.3 or later, and pnpm available to the DSH CLI.
- An operating system supported by your DSH and Node.js installations. The local package checks were performed on Windows.
- Access to the npm registry for installation, plus at least one compatible model source you are authorized to use. DSH must be able to reach that source for inference.
Installation
Install from npm using the DSH CLI. Replace web with your DSH profile name if it differs.
dsh plugin --profile web add dsh-account-relay
Open that profile in DSH. Installation is ready to use when Account Relay (账号接力) appears in the sidebar and its settings page opens.
Quick start
- Open Account Relay and edit the default relay model. Add one model from the DSH catalog. Its provider and model should appear under the first group.
- Save the settings. Open a chat and choose that relay model from Account Relay in the model picker.
- Send a short message. When the reply arrives, check Runtime status for the provider and model that handled the request.
Configuration, data and permissions
Set the concurrency limit for each source. Models from the same DSH provider share that source's limit across relay models. Unlimited removes only the plugin's local cap. Provider limits still apply. Put interchangeable sources in the same group and order the groups by preference. A fast group is an existing group marked for acceleration. Its priority session list is ordered and belongs to the individual relay model. Each relay model can also offer custom reasoning levels and map those levels to the settings supported by each upstream model.
The global protection period defaults to five minutes. The regular-route retry interval defaults to 30 seconds, with up to 10 queued retries. The background reachability interval defaults to 60 seconds.
Set reasoning effort in the conversation's model picker. For DSH catalog sources, an effort uses the matching upstream ID by default. The routing settings can map it to another ID per model. Routes without a supported mapping are skipped for that request. The relay takes the smallest known context window and default output limit across its routes.
Catalog sources reuse DSH's provider configuration and credentials through the DSH adapter. Manually added sources can use a DSH-managed key or an external credential reference. Settings and bounded request and routing records stay under data/account-relay/ in the DSH home. Records can include session identifiers, source labels, model names, timestamps and error categories. The plugin needs access to DSH's model, credential and web services, its own local data, and the configured upstream endpoints. A configured manual source may also use its provider's usage endpoint.
How requests are scheduled
The scheduler starts with no active requests, queued requests or reserved slots. Each scheduling event updates that state. Before dispatch, it rechecks the source's health, capacity, the session that owns any reservation and the request's place in the routing order.
| Event | Scheduling decision |
|---|---|
| A request arrives | Reuse its session's existing route when eligible under the current rules. If a different route is needed, consider groups in order and skip paused or currently ineligible sources. Within a healthy group, the source with the fewest active requests is preferred and ties rotate. After cooldown, one eligible real request can confirm recovery when the source has room. |
| Regular capacity fills | Use the next eligible group. When a fast slot is needed, the ordered priority list decides which eligible sessions get first claim. If a higher-priority session is on a regular route and can take the fast capacity, the ordinary request waits for an eligible regular slot. After the priority session's active model request ends, the ordinary request can take the released slot and the priority session's next request can take the fast route. |
| A model request finishes | Release its in-flight count once. When an eligible slot can be reserved, keep it for the same session through tool calls and other gaps in the running turn. A finite source counts an active request and an idle reservation separately and never counts the same slot as both. An unlimited source can retain the route without holding finite capacity. |
| The whole turn ends or resumes | Start the protection countdown for the session's reserved route when DSH reports the end of the turn. If the session returns before expiry, it can reuse the reservation. A compatible, wholly unused earlier route can be tried on the next request without waiting for expiry. A priority handoff can also transfer a slot at a request boundary. |
| Protection expires | Release the reservation and re-evaluate waiting requests. Requests already generating continue on their current routes. When a higher-priority session qualifies for available fast capacity and a lower-priority or ordinary session still needs the regular route, the priority session stays in or moves to the fast group at its next request. This leaves the regular slot for the other session. Arrival or queue order can break ties among sessions with equal priority and the same dispatch conditions. |
| A source fails or is paused | Cool down a transient failure and honour the upstream retry delay. A regular-route recovery queue uses a waiting request as the trial and bounds how many requests can claim that source's finite capacity. When retries run out or you choose Stop queueing, eligible requests can continue in route order. Background HTTP HEAD checks indicate reachability only. A paused source stops taking new requests. Explicit quota exhaustion gates the source until its retry window permits a trial. |
| A request is cancelled or delivery is uncertain | Cancellation removes the waiting request or releases its active slot. Automatic retries or fallback require a retryable explicit rejection or a request known to be unsent, with no output delivered. A transport interruption with uncertain delivery or a partial response stops automatic replay of that attempt. |
For example, suppose three sessions already use a regular group with three slots. One is a priority session. A fourth, ordinary session arrives when a compatible fast route is available. The ordinary session waits for the regular slot. At the next safe request boundary, the priority session is eligible for the fast route and the ordinary session can take the regular slot. If another regular slot opens first, the ordinary session can use it and the handoff is no longer needed.
The runtime panel uses DSH's live session state to replace stale completed rows with the current running state. It distinguishes active model requests, wait reasons and post-turn protection. The bounded upstream request history records each attempt, including first-attempt successes. A cancelled attempt is marked as unsent, submission unknown or submission confirmed. Even when submission is confirmed, billing remains unverified. The switch log tracks changes in the dispatch target. Waiting and retrying the same route do not add a switch.
Upgrade and uninstall
Let active turns finish, then back up data/account-relay/ in your DSH home. Install the desired version into the same profile using its npm version. For 0.5.1, run:
dsh plugin --profile web add dsh-account-relay@0.5.1
The relay continues to read settings format 1. Older sources without a type are read as manual sources. Reopen the same profile and check your saved relay models.
To remove the package from the profile:
dsh plugin --profile web remove dsh-account-relay
The package command leaves the relay's settings and request records under data/account-relay/. Credentials managed by DSH remain in its credential store. If you need to remove a relay-managed key, clear it from Advanced sources before uninstalling.
Known limitations and troubleshooting
- Sidebar entry missing. Check that the package is installed and enabled in the profile you opened. Check the DSH version and the plugin startup diagnostics.
- Model does not run or stays queued. Open the relay model and check that a compatible route is enabled. In Runtime status, look for capacity, protection, an active handoff or a recovery delay. Inspect Upstream requests for the actual provider, model and error details.
- Reasoning level missing. Check the selected relay model's mappings and the upstream's supported effort levels.
- Delivery uncertain. Check the provider's activity or billing records before manually resending. An HTTP response or a reachable endpoint does not establish that inference finished.
- Same-process reload can retain session routing state and hand off waiting requests within a short window. A process restart does not guarantee continuity. End-to-end testing against paid upstream services and process-restart recovery has not been verified for this version.
Development and release notes
Run npm run check in a source checkout to syntax-check the shipped JavaScript. See the changelog and GitHub Releases for published changes.
Feedback and security reports
A private security-reporting channel is not currently available. Keep credentials, account and session identifiers and raw logs out of public reports.
License and third-party notices
The original plugin code, documentation and icon are licensed under the MIT License. DeepSeek Harness, pnpm and the web components supplied by DSH remain under their respective licenses. The package does not redistribute them. The plugin uses Node.js built-ins and the React runtime provided by DSH.
还没有评论,来写第一条。