Introduction¶
During development or debugging with DeepSeek Harness (DSH), request failures are often encountered. The interface usually only displays vague messages such as “API Error” or “Provider Error,” lacking critical context such as error codes and Request IDs. HTTP status codes returned by third-party gateways (for example, 401, 403, 429) are often handled uniformly in the interface, making it difficult to quickly identify the root cause.
The dsh-error-lens plugin aims to solve this problem. As a community plugin for DeepSeek Harness, it reads local session logs, organizes failed records into structured diagnostic information, and automatically redacts sensitive content, helping developers quickly troubleshoot API failures.
Plugin Introduction¶
dsh-error-lens is a read-only, redacted model request error diagnostic tool.
- Maintainer: Wanbinyu
- Category: admin-security
- License: MIT
- Positioning: It does not intercept requests or automatically retry requests; it exists only as an auxiliary diagnostic panel for the Web UI.
Core Features¶
- Failure Information Display
The plugin displays the latest request failure that has not yet recovered above the message input area. - History Comparison
After expanding the panel, you can review the 3 most recent previous failure records, making it easier to determine whether the issue is recurring. - Error Classification
The plugin categorizes errors into 8 types: authentication, access denied, rate limiting, context limit exceeded, compatibility, timeout, network, and server-side errors. - Key Context
It displays the provider error message already persisted by DSH and the corresponding Request ID, which are important references for troubleshooting. - Report Generation
It provides a one-click copy feature that generates a bilingual, redacted diagnostic report in Chinese and English, suitable for direct submission to GitHub Discussions or sending to technical support. - Interaction and State
It supports manually closing the current diagnostic panel without deleting records in the session, and it automatically hides the notification after the next conversation turn completes successfully.
Installation and Enablement¶
Before installation, please ensure the environment meets the following requirements:
- Node.js: version >= 22.19
- DeepSeek Harness: version 0.1.0-rc.6 or higher
Use the officially provided installation command to install it:
dsh plugin --profile web add https://github.com/Wanbinyu/dsh-error-lens/releases/download/v0.1.7/dsh-error-lens-0.1.7.tgz
After installation, restart the Harness service to load the plugin:
dsh web
To uninstall it, you can use:
dsh plugin --profile web remove dsh-error-lens
Configuration Description¶
The plugin’s default configuration is located in the Web profile’s cordis.patch.yml file:
- insert:
- id: error-lens
name: dsh-error-lens
config:
maxRecords: 10
maxMessageLength: 2000
| Configuration | Default | Description |
|---|---|---|
maxRecords |
10 |
Number of recent errors retained per session projection, range 1-50 |
maxMessageLength |
2000 |
Maximum character length for a redacted error, range 256-8000 |
Privacy and Boundaries¶
The plugin is designed with strict privacy principles in mind:
- Data source: It only processes failed terminal records that already exist in DSH session logs.
- No sensitive information access: It does not read keys from
settings.yaml, and it does not record request bodies or full prompts. - No external interaction: It does not send telemetry to external services, and it does not automatically change configurations, retry requests, or switch models.
- No DOM injection: It is implemented based on the official session projection and Web UI slots, and it does not perform destructive DOM injection.
Although the plugin attempts to remove API Keys, Tokens, and URL key parameters using text-based rules, it is still recommended to manually review copied or public reports, because text-based redaction cannot guarantee coverage of all provider-specific error formats.
Applicable Scenarios and Cautions¶
- Applicable scenarios: Suitable for debugging API calls, investigating gateway errors, and analyzing Request IDs.
- Caution: This is an unofficial community plugin and has no affiliation with or endorsement from DeepSeek.
- Permission notice: The plugin runs with the permissions of the current DSH process. Before installing any plugin, it is recommended to review its source code and license.
Conclusion¶
dsh-error-lens provides an intermediate layer that turns vague error messages into clearer diagnostics. For developers who frequently troubleshoot API issues, it can significantly improve the efficiency of communication and debugging.
- GitHub Repository: https://github.com/Wanbinyu/dsh-error-lens
- Plugin Directory: https://www.skillhub.cn/plugins/Wanbinyu/dsh-error-lens