In the DeepSeek Harness (DSH) ecosystem, when integrating third-party models (such as GPT) and using the ToolCall feature, developers often face two specific issues: misparsing of the ToolCall Schema by the model, causing parameter validation failures, and unresponsive tool calls that hang the session. The yukari316/dsh-toolcall-compat plugin addresses these two pain points with a targeted solution.
Plugin Overview¶
yukari316/dsh-toolcall-compat is a DSH plugin maintained by Yukari316. It fixes schema parsing errors for third-party models in DSH ToolCall and provides a skip feature for stuck tool calls. The plugin is licensed under the MIT License.
Core Features¶
Compatibility Mode (schema-fix)¶
DSH enforces strict upgrade parameter validation for ToolCall. It requires sandbox_permissions and justification to appear as a pair, and justification must be a non-empty sentence. Third-party models (such as GPT) frequently insert these two fields into every call, causing parameter validation to keep failing during retries.
The plugin enables compatibility mode by default. It modifies the arguments of the tool-call block in the block-end chunk of the llm/stream stream, automatically removing the sandbox_permissions and justification parameters. A yellow compat bypass badge is displayed on the card, making modified calls easy to identify.
Skipping Stuck Calls (stuck-skip)¶
For tool calls that remain unresponsive for an extended period, DSH currently cannot directly interrupt them or configure a timeout, leaving the session in a waiting state. This plugin detects tool calls that have been running beyond a configured threshold (default 15s), displays a notice above the tool call that it may be taking too long, and allows it to be skipped.
After clicking skip, the unresponsive tool call is terminated. In the next step, the LLM receives a message such as skipped because unresponsive ... do not retry, allowing it to continue executing subsequent tasks.
Installation and Enablement¶
Installing the plugin requires a pnpm or npm environment. Use the following command to install it into the web profile:
dsh plugin --profile web add @yukari316/dsh-toolcall-compat
If pnpm is not available in the environment, you can use the npm method instead:
npx -y @yukari316/dsh-toolcall-compat
After installation is complete, restart dsh web.
Configuration¶
Add the following configuration to $DSH_HOME\settings.yaml to adjust the plugin behavior:
toolcall-compat:
enabled: true
renderEscapes: true
stuckAfterMs: 15000
Configuration options:
* enabled: Master switch for compatibility mode.
* renderEscapes: When expanding a card, display escape sequences as characters.
* stuckAfterMs: Duration after which a running call can be prompted as skippable (in milliseconds, range 1–600s).
Verification and Precautions¶
To verify that the plugin is working, have the model perform a tool call that triggers sandbox permissions. Errors such as invalid justification or sandbox escalation ... not strictly wider should no longer appear, and the number of related parameter calls in the logs should visibly decrease.
Note that the plugin runs with the permissions of the current dsh process. Its dependencies include @deepseek-ai/cordis, @deepseek-ai/dsh-llm, and others.
Summary¶
yukari316/dsh-toolcall-compat resolves common obstacles encountered when third-party models perform tool calls in DSH by fixing schema parsing errors and providing a timeout skip mechanism, thereby improving the stability and usability of conversations.