Introduction¶
When the DeepSeek Harness (DSH) Web GUI loads session history, it receives all raw events (including streaming chunks) for the most recent 50 messages. The response payload size is typically between 4 and 13.4MB, and the server does not compress responses by default. Because browser RPC requests have a hard 30-second timeout, transmission can time out in remote-access scenarios with low bandwidth or poor connectivity (cross-region networking, mobile networks, etc.), causing the UI to display “Failed to load history”.
dsh-gzip is a transitional plugin designed for this scenario. It compresses /api responses, reducing bandwidth usage and resolving history loading failures caused by timeouts.
Plugin Description¶
dsh-gzip is a gzip compression plugin for DeepSeek Harness /api responses.
* Maintainer: Community-maintained (github.com/040822/dsh-gzip)
* License: MIT
* Purpose: Transitional gzip patch for earlier DSH versions
Core Features¶
- Compress /api responses: Intercepts and compresses returned data from
/apiroutes. - Reduce bandwidth usage: In practice, it can reduce payload size by about 91.4% (for example, compressing 13.4MB to 1.16MB).
- Fix loading failures: On slow links, it reduces transmission time and avoids triggering the browser’s 30-second timeout that aborts requests.
- Implementation mechanism: Monkey-patches the
/apiroute handler and wraps theresobject for each request. - Compression rules: Handles requests with
Accept-Encoding: gzipand supports response types such asapplication/json,*+json,text/*, etc. - No streaming handling: Explicitly does not process
text/event-stream.
Installation and Enablement¶
Before installing, ensure DeepSeek Harness is installed and the Node.js version is ^22.19 or >=24.
Use the official plugin installation command:
dsh plugin --profile web add dsh-gzip
After installation, the DeepSeek Harness Web service must be restarted for the plugin to take effect.
Verification Methods¶
After restarting the service, you can confirm whether compression is enabled in the following ways:
- Use the curl command:
curl -s -D - -o /dev/null -X POST http://127.0.0.1:3080/api/session.list \
-H "Content-Type: application/json" -H "Accept-Encoding: gzip" \
-d '{"type":"client-request","rpcId":"test","method":"session.list","payload":{}}' \
| grep -i content-encoding
The expected output should include `content-encoding: gzip`.
- Use browser DevTools:
Open the Network panel, check the Response Headers of anysession.*request, and confirm that it includescontent-encoding: gzip.
Compatibility and Limitations¶
This plugin is a transitional solution for older DSH versions and is not applicable to DSH 0.1.2-rc.1 or higher.
- Supported DSH versions:
>=0.1.0-rc.6 <0.1.1-0 || >=0.1.1-rc.0 <0.1.2-rc.1 - Unsupported versions:
0.1.2-rc.1and higher (official DSH now includes the gzip middleware and has migrated streaming RPC) - Required environment: Node.js
^22.19or>=24
Because DSH 0.1.2-rc.1+ includes an HTTP gzip middleware by default and has migrated streaming RPC to WebSocket, this plugin is incompatible with these versions and installation is not recommended.
Conclusion¶
dsh-gzip resolves the history loading pain point of older DSH versions in low-bandwidth environments with a simple monkey-patch solution. As official versions are updated, this plugin is gradually becoming obsolete and now serves only as a temporary patch for specific versions.
Repository: github.com/040822/dsh-gzip