In the development and debugging of DeepSeek Harness (DSH), fine-grained control over LLM API request behavior is key to improving stability and debugging efficiency. The dsh-request-manager plugin aims to take over and modify DSH’s default request behavior through global configuration policies, such as adjusting request intervals, overriding retry counts, and handling request failures in specific scenarios.
Core Features¶
The plugin provides a control panel through the “Request Management” button at the top of the session area. All settings are globally effective and shared across sessions, and the configuration is automatically persisted.
Extra Request Interval¶
Inserts an additional delay (milliseconds) between each API request. This setting does not affect the first request in a session, and applies to both automatic and manual retries. Setting the value to 0 disables this feature.
Retry Count Override¶
Modifies the number of automatic retries after an API request fails. DSH’s default retry count is 5. This option allows customizing that value; leaving it blank means the default policy is not overridden. Note that for failure types that DSH does not retry by default (such as SSE stream ended without [DONE] or NETWORK ERROR), this option does not affect their handling logic.
Intercept “Request Failure”¶
After an API request fails, the plugin automatically expands the panel and provides resolution options. This feature also applies to failures that DSH does not retry by default.
- Retry: Resends the same request in place (still subject to the extra interval). If it fails again, the prompt is displayed again.
- Abandon: Terminates the current round of requests via DSH’s native path.
- Timeout Settings: The timeout duration (seconds) and timeout action can be configured.
0means the timeout mechanism is not enabled. When “Auto Retry” is selected, continuously failing requests are resent repeatedly according to the timeout cycle.
Installation and Enablement¶
After installing the plugin, the DSH process must be restarted for the changes to take effect.
dsh plugin --profile web add github:tree-func/dsh-request-manager
Usage¶
- Open any session in DSH.
- Click the “Request Management” button at the top of the session area.
- Configure the settings in the popup panel. The configuration values determine whether the features intervene:
- Enter a non-zero value to enable “Extra Request Interval”.
- Enter a non-zero value to enable “Retry Count Override”.
- Select “Intercept” and configure the timeout action to enable “Intercept Failure”.
Technical Architecture¶
The plugin is implemented as a Bundle and consists of two parts: Host (index.js) and Client (client.js).
- Host: Mounted at the Web Profile root layer, it listens for
agent/request(insert interval) andagent/request-error(retry and intercept) events, and registers the/reqmgr-apiroute for the frontend to read and write configuration. - Client: Loaded through the official ModuleLoader, it registers the UI button and panel, uses semantic CSS variables for theme adaptation, and restores configuration from localStorage.
Known Limitations¶
- Session isolation: The failure interception prompts (panel expansion and warning dot on the button) appear only in the session where the failure occurred. If that session is not returned to for a long time, the pending state will automatically retry or abandon according to the timeout settings.
- UI language: The interface text automatically switches according to DSH’s language settings.
Ecosystem Context¶
DSH is a plugin-based DeepSeek proxy tool. This plugin is maintained by the developer tree-func and follows the MIT license. The community directory provides plugin index services and has no affiliation with official DeepSeek.