Introduction¶
When connecting an OpenAI-compatible route in DeepSeek Harness (DSH), requests pass through Fetch, SDK, pi-ai, and finally session events. During network jitter, gateway rate limiting, or compression failures, the interface often shows only [TRANSPORT] Connection error. or short status codes. Clues such as DNS, response headers, retry-after, and upstream ECONNREFUSED are swallowed by the middleware layer, making troubleshooting rely on repeatedly enabling logs to guess. The community plugin dsh-better-tips (maintainer HakureiMonika) extends error display and retry behavior without modifying the DSH core, presenting underlying evidence alongside native errors, and supports one-click copying of sanitized troubleshooting reports.
What is it¶
dsh-better-tips is a zero-configuration DSH error diagnosis and retry enhancement plugin, categorized as a workflow capability extension. It addresses the route pain point of “generic errors after pi-ai adaptation,” supplementing the exception chain, key response headers, and truncated error bodies, and performing limited extra retries for normal requests and context compression respectively. In scenarios where it cannot be confirmed to be the current error, it yields; the main area still displays native DSH errors. The project is independently developed and maintained from the official DeepSeek release, current npm version is 0.13.2, and it uses the MIT license.
Environment Requirements (refer to README):
- DSH:
>=0.2.2-rc.2 <0.3.0(tested on0.2.2-rc.3) - Node.js:
>=24.9.0 - OS: Windows tested; Linux, macOS expected compatible, not yet tested
Core Features¶
The following sections explain features by capability, all derived from the project README and package.json.
Clearer Errors and Troubleshooting Suggestions¶
Scenarios like connection failures and compression failures show a short preview and a line of troubleshooting advice; “Underlying Raw Details” and “DSH Native Error” are collapsed at the same level. The error body is truncated at 4096 characters by default. Consecutive errors of the same type are collapsed into history, with the newest one manually collapsible and marked in red as “Latest Error”.
Typical reconstitution includes: TCP/TLS interruptions extracting chains like [UND_ERR_SOCKET] other side closed and TypeError: fetch failed → SocketError; HTTP 429 preserving retry-after, x-ratelimit-*, x-request-id, and JSON top-level details; HTTP 502 showing gateway headers like server, via and upstream connection rejection diagnostics.
Failed Retry and Native Yielding¶
Normal requests and compressed requests (/compact) each retry an extra 2 times by default, with increasing wait times, constrained by configuration limits. The plugin does not retry AUTH, QUOTA, CONTEXT_WINDOW_EXCEEDED, etc.; for errors not involving network or without effective underlying capture (e.g., MALFORMED_RESPONSE), it does not obscure DSH native information and copy entry points.
Compression Failure Visibility¶
Automatic and manual compression failures are presented as cards in the chat, accompanied by the retrieved model, usage, and network diagnostics, avoiding the difficulty of tracing silent compression failures.
Troubleshooting Reports and Logs¶
One-click copy of a plain text report summarizing the model, duration, underlying evidence, and a list of currently enabled third-party plugins, with common credentials filtered out; “Open Logs” allows viewing raw session events and log file paths by seq. Some known errors provide source code location references.
Interface Language¶
Card mounts, buttons, and report date formats follow the DSH interface’s Chinese/English; upstream error bodies, response bodies, and error codes are not translated.
Installation and Enablement¶
The plugin works out of the box and is effective by default with zero configuration. Please review the GitHub repository source code and MIT license before installing; the plugin runs with the current DSH process permissions.
Graphical Interface (Recommended)¶
Open DSH Plugins (Plugin Management) → Add plugin, and enter the repository address:
https://github.com/HakureiMonika/dsh-better-tips
Command Line¶
# Install via npm
dsh plugin add dsh-better-tips
# Or install via GitHub repository
dsh plugin add https://github.com/HakureiMonika/dsh-better-tips
During local development, the README notes that the absolute path of the repository directory can be passed directly.
Optional Configuration¶
If you need to adjust retry counts or capture scope, override plugin configuration in the Profile’s cordis.patch.yml. Note that config replaces everything, so you need to retain the items you still need; setting extraRetries and compactionRetries to 0 disables the extra retries for this plugin.
- id: better-tips
name: dsh-better-tips
config:
enabled: true # Host capture and retry toggle
extraRetries: 2 # Extra retries for normal requests (0–20)
compactionRetries: 2 # Extra retries for compression requests (0–10)
initialDelayMs: 1000 # Initial wait in milliseconds
maxDelayMs: 20000 # Single wait limit
jitterRatio: 0.2 # Random fluctuation ratio for wait time (0–1)
retryableCodes: # Error codes allowed for extra retry
- PI_AI_ERROR
- TRANSPORT
- TIMEOUT
- SERVER
- EMPTY_RESPONSE
- RATE_LIMIT
captureDetails: true # Capture underlying network evidence
captureHosts: [] # Specify hosts, leave empty to capture all
Applicable Scenarios and Notes¶
Who is it for: DSH users who frequently integrate with remote APIs, encounter rate limiting/gateway/disconnections but only see generic Transport prompts; scenarios where compression failure traceability is needed, but users still want to see native errors when failures occur.
Privacy Boundaries (stated in README): The capture agent does not actively collect successful response bodies, full request headers, or URL query parameters, but error bodies and adjacent logs may still echo input content; reports have credential filtering and cannot replace manual verification before sharing. “Copy Full Error” and the native area preserve the original text.
Ecosystem Explanation: DSH adheres to “everything is a plugin”; the SkillHub Directory Page is a community entry, with no official affiliation to DeepSeek / QuantCube.
Conclusion¶
After the steps above, installing dsh-better-tips allows you to bring back network and gateway evidence obscured by the adaptation layer to the interface without modifying the core, and automatically retry transient faults within a controllable budget. For further explanation and screenshots, see the GitHub README; issues and adaptation requests can be reported via the repository Issues.