The DeepSeek Harness (DSH) Web interface currently only provides a basic model list view. It lacks direct UI controls for fine-grained capability configuration of custom models (such as llm-pi-ai), including image input and reasoning effort mapping, as well as model selection policies for subagent delegation. The dsh-custom-provider plugin extends the settings page by adding a “Custom Models” section, completing these configuration options.

Plugin Overview

This plugin is an extension component for the DeepSeek Harness Web settings page, maintained by homily707. It coexists with the official Models page and provides subagent model whitelisting, image input support, and reasoning effort mapping through the new section.

Core Features

The plugin includes the following three core capabilities:

  1. Subagent Model Whitelist
    A new card is added at the top of the settings panel. Available models are selected via a dropdown; manual input is not supported. Once enabled, the subagent tool registers list_subagent_models, allowing delegation to select provider, model, and reasoning_effort from the whitelist. Routes outside the whitelist are intercepted before subagent creation.

  2. Image Input Support
    Provides per-model capability mapping for different models:

    • llm-pi-ai: configure the input field for each model.
    • llm-deepseek: configure the inputModalities field for each model.
  3. Reasoning Effort Mapping

    • llm-pi-ai: supports per-model reasoningEfforts configuration (checking levels generates a selector; values are the route spellings, off can be left empty, and false indicates a non-reasoning model).
    • llm-deepseek: the reasoning level set is fixed and locked at the route level; this page only provides route-level fields.

Installation and Enablement

The installation command is as follows:

dsh plugin --profile web add "github:homily707/dsh-custom-provider"

After installation, add the plugin package name to the dsh.profile.bundles array in ~/.dsh/profiles/web/package.json. Restart dsh web or dsh --profile web, then refresh the page. A “Custom Models” section will appear in the settings panel.

Typical Usage and Configuration

The icons in the left column of the settings panel are currently hardcoded by the host. If you want the “Custom Models” section to display the same icon as the “Models” page, modify the host file client.js with a Python script:

python3 - <<'EOF'
f = '<dsh 安装目录>/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js'
s = open(f).read()
old = '\t\tif (id === "agent-presets") return'
new = '\t\tif (id === "custom-provider") return (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconDataOutline16, {\n\t\t\tclassName: SettingsRoot_module_css_default.navIcon,\n\t\t\tsize: 16\n\t\t});\n' + old
assert s.count(old) == 1
open(f, 'w').write(s.replace(old, new))
EOF

Local Development

For local development, add the plugin using the link method:

dsh plugin --profile web add link:<本仓库检出路径>

Subagent Configuration Management

Subagent configuration is written to $DSH_HOME/cordis.patch.yml through a managed block, using the # >>>/<<< dsh-custom-provider subagent (managed) marker block. After configuration changes, the Web profile patchReload is live, so saving triggers hot reloading.

Known Limitations and Notes

  1. Model Default Profile Differences: the llm-deepseek route has no per-model effort mapping (the adapter is locked at the route level); the llm-pi-ai per-model fields only include capability mappings and do not have a “per-model default”, so defaults exist only at the route level.
  2. Session Scope: the subagent model self-selection policy is sampled and recorded at session creation, and it only applies to new sessions created afterward.
  3. Loader Patch Behavior: the config in a loader patch is a full-key replacement. The managed block must fully redeclare the tool-subagent baseline from dsh-base. If a dsh upgrade changes the baseline, synchronize BASE_TOOL_CONFIG in index.js.
  4. Explicit and Implicit Selection: delegation that omits an explicit selection follows the parent session route and is not validated against the whitelist.

Summary

dsh-custom-provider addresses the lack of custom model capability configuration and subagent delegation controls in the DeepSeek Harness Web interface. By directly modifying the settings page wiring, it achieves coexistence with the official Models page without conflicts. It is suitable for developers who need fine-grained tuning of model behavior.