dsh-auto-review-model-select: Specify the Review Model for Auto Review and Normalize the Verdict Output

Introduction

After enabling Auto mode in DeepSeek Harness (DSH), every tool call execution goes through an “Auto review” before running: equivalent to having the model re-evaluate whether this call should be allowed. In the default implementation, the routing of review requests follows the main session’s provider/model and has no separate configuration. At the same time, the review endpoint has strict requirements for the response format—it must be the prescribed block structure, and text can only be one of six valid JSON types, with finish required to be stop. Generic models often include prefixes/suffixes, code fences, extra reason fields, or are truncated due to max-tokens. These issues result in AUTO_REVIEW_FAILED, causing the call to be blocked without retry or escalation to a human agent.

Below is an introduction to the community plugin dsh-auto-review-model-select: it re-routes review requests to the model you specify and fixes or provides fallback for non-compliant decision outputs at the stream level.

What is it

dsh-auto-review-model-select is released by maintainer GT-610 and is categorized as “Model Inference” in the DSH plugin directory. In one sentence: It provides configurable review model routing for Auto review and normalizes decision outputs that are difficult to parse directly into a format acceptable to the gate.

It does not replace DSH’s built-in dsh-experimental-auto-review, but operates on top of it to handle routing and output on the review side; the main model, Auto sandbox, and approval semantics remain unchanged.

Core Features

The capabilities listed below can be toggled individually via configuration after installation.

  1. Switch Review Model: Re-dispatch auto-review type requests to your configured provider / model; when both are left empty, it still follows the main model. If only one is filled, it is treated as “follow main model” and does not switch half the routing.
  2. Format Hint (hint): Re-emphasize the JSON protocol at the end of the reviewer’s system prompt.
  3. Repair Output (repair): Buffer and parse text at the stream level, tolerating interleaved narrative, code fences, extra reason, low + deny, high + allow, max-tokens truncation, and even decision outputs written as tool calls, finally synthesizing a “exactly 1 text block + stop”.
  4. Failure Fallback (fallback / retry): When the decision cannot be read at all, or the review request itself fails (rate limiting, connection interruption, etc.), it can be downgraded to medium + deny (which becomes a standard approval popup in the ask approval strategy) or let the call fail; retry controls the number of extra reviews between 0 and 2.

Implementation-wise, it monitors the llm/stream waterfall and only processes requests where purpose === 'auto-review'. Since the options passed to the gate are deep-frozen, the plugin copies the request and re-calls ctx.llm.stream(), using a WeakSet to avoid recursion.

Installation and Activation

Requires DSH >= 0.2.2-rc.1 (see engines.dsh in the repository’s package.json). The plugin is currently at version 0.1.1 with an MIT license; it has not been published to npm yet, so install it from GitHub:

dsh plugin --profile <profile> add github:GT-610/dsh-auto-review-model-select

Restart DSH after installation. The repository includes dist/, so no local build is generally required when installing from Git.

Configuration entry: Settings → Plugins → Auto Review Model → Configure. Fields are volatile, meaning changes take effect on the next review without restarting the plugin. You can also define this in the plugin line of your profile’s cordis.patch.yml, which is the same configuration as the settings page.

Field Default Description
enabled true Global switch
provider "" Review model provider; leave empty to follow main model
model "" Review model ID; leave empty to follow main model
reasoningEffort "" Review reasoning effort; leave empty to use model default
hint true Whether to append format hints
repair true Whether to normalize decision output
retry 1 Additional review attempts when unable to read decision (0-2)
fallback "deny" When unable to read or request fails: deny for human approval, fail to let call fail

Typical Usage

If the main model is capable but format stability is an issue, you can keep provider / model empty and only enable repair and hint to observe whether AUTO_REVIEW_FAILED still appears.

If you wish to use a smaller or cheaper model specifically for review, fill in both provider and model in the configuration. For example, you can point it to another set of inference endpoints configured in your profile (specific values depend on your DSH model configuration and must match the local provider name).

When review fails frequently and you have confirmed it is a network or rate limiting issue, you can set fallback to deny to avoid tool calls failing directly without an approval entry. Setting retry to 0 can reduce review costs in long sessions (the documentation notes a maximum of 2 extra review requests per attempt).

Applicable Scenarios and Notes

Who is this for: Developers who rely on Auto review in DSH Auto mode and are encountering non-compliant output from the review model, or wish to separate the review process from the main conversation model.

Plugin Permissions: Like other DSH plugins, it runs under the permissions of the current DSH process; before installing, it is recommended to browse the repository source code and MIT LICENSE to ensure the behavior aligns with your security policy.

Known Limitations (from README):

  • Switching to another provider will lose the prefix cache of the review request, potentially increasing review costs in long sessions.
  • Direct Node.js side effects within run_code programs are outside the scope of Auto review, and this plugin does not cover them.
  • It only modifies the review request and does not affect the sandbox semantics of the main model or Auto mode itself.

For local secondary development, Node.js >= 22.19.0 is required, using pnpm install / pnpm build; changes to the Host side (src/index.ts, src/repair.ts) require restarting DSH.

Conclusion

dsh-auto-review-model-select targets two issues with Auto review: routing rigidity and an overly narrow output protocol. It provides a configurable review model, fixes common format deviations at the stream level, and offers the option to downgrade to human approval rather than silently blocking calls upon failure.

The DSH ecosystem emphasizes “everything is a plugin.” Community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / Hypothesis. Star counts and usage statistics are based on real-time display on the GitHub page.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye