dsh-model-modality: Modality and Inference Configuration of the DSH Model Settings Page

Preface

DeepSeek Harness (DSH) adopts a plugin-based architecture where extended functionality is typically achieved by modifying configuration files or directly injecting Bundles. When managing model capabilities, it is sometimes necessary to configure input modalities (e.g., whether images are supported) or reasoning effort levels for specific models. The dsh-model-modality plugin provides a visual configuration entry by modifying the DSH Web Models settings page, writing directly to the input and reasoningEfforts fields without the need for manual configuration file editing.

Plugin Positioning

Maintained by the developer hmtxj, this plugin aims to add per-model control capabilities to the DSH Models settings page. It acts on Providers managed by the @deepseek-ai/dsh-llm-pi-ai adapter, bringing model capability declarations—which previously could only be reflected in configuration files—down to the UI level for direct operation.

Installation and Activation

Plugin installation must be performed via a CLI command. Restarting the corresponding DSH Profile is required after installation.

dsh plugin --profile web add github:hmtxj/dsh-model-modality

Once the installation is complete, restart the target Profile and navigate to Settings → Models in the Web interface to view the relevant controls.

Feature Description

The plugin primarily provides two types of configuration functions, applied to the Provider card and the model edit dialog, respectively.

1. Input Modality Configuration

On the Settings → Models page, each Provider card lists the models provided by that Provider.

  • Default State: Text input is enabled by default and cannot be unchecked.
  • Enable Image: Checking the Image option causes the plugin to write input: [text, image] to the configuration.
  • Disable Image: Unchecking the Image option results in a configuration write of input: [text], explicitly declaring that the model supports only text, rather than inheriting the Catalog default values.
  • Saving: Modifications to the input type are saved immediately.

2. Reasoning Effort Level Configuration

In the Provider’s Edit dialog, expand a specific model row; reasoning controls will appear alongside the context and output limits.

  • Optional Values: Supports seven levels: off, minimal, low, medium, high, xhigh, and max.
  • Mapping Rules:
  • Selecting a level results in a configuration write in the form of { "high": "high", "max": "max" }, meaning “selection maps to value”.
  • off maps to null.
  • Inheritance Configuration: Clearing all selections removes the explicit declaration, reverting to the Catalog’s default configuration.
  • Rejected Items: Selecting only off is rejected because the adapter does not accept this configuration.
  • Saving: Must be committed via the dialog’s standard save action. This operation updates or creates an explicit models list.

Notes

Please observe the following limitations and environmental requirements when using this plugin:

  1. Adapter Limitation: Applicable only to Providers managed by the pi-ai adapter family; other adapters are unaffected.
  2. Bundle Write Permissions: The reasoning control function requires write permissions for the installed Models UI Bundle. The plugin automatically patches the Bundle when the Profile is loaded.
  3. Reverse Proxy Compatibility: The input type API requires the Host header to be Loopback in the current build. If a reverse proxy forwards an external Host header, a 403 error may occur.
  4. Compatible Versions: Verified compatibility with DSH 0.1.5-rc.1 (paired with Models UI 0.1.5-rc.2) and 0.2.0-rc.2. In future versions, if the UI structure changes (e.g., ModelRow component changes), the plugin may fail to recognize the layout.
  5. Plugin Removal: Removing the plugin does not automatically restore the patched Bundle. To restore, you must delete and reinstall the Bundle, or manually restore the backup file (client.js.pre-thinking-patch) corresponding to that Bundle version.

Summary

dsh-model-modality simplifies the configuration process for model modalities and reasoning levels in DSH via UI extensions. It does not generate new capabilities but rather declares existing ones. For developers requiring fine-grained management of model configurations, this plugin offers a more intuitive operation method than directly editing YAML files.

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

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

Xiaoye