dsh-model-smart-config: Smart Parameter Completion for Third-party API Model Rows

Introduction

When configuring third-party API providers in DeepSeek Harness (DSH), the common workflow is to fill in the URL, key, and model ID, then manually maintain the context window, input modalities (text / image), and reasoning effort. When the official discoverModels takes the network path GET {baseURL}/models (which is usually the only path available for third-party providers), the returned fields often only contain id, name, and optionally contextWindow and maxTokens, without modalities and reasoning effort. The official provider editor also deliberately does not provide reasoning effort in the UI, as it is a capability that varies by model and defaults to being left in the config file for manual user modification.

dsh-model-smart-config addresses this gap: it recognizes model IDs on official model rows, and after user confirmation, fills in context window, input modalities, and reasoning effort into controlled form fields, rather than creating a separate configuration area or silently rewriting cordis.patch.yml.

What This Is

Item Description
Name dsh-model-smart-config
Maintainer Seller-1990
Category Model Inference (DeepSeek Harness Plugin)
Type dsh.bundle bundle patch + Web client
License MIT
Current Version 0.3.3 (see repository package.json)

Plugin introduction (consistent with the directory page): For DeepSeek Harness third-party API providers, recognizes model IDs and supplements context window, input modalities, and reasoning levels.

The plugin package itself has zero runtime dependencies (@deepseek-ai/* is supplied by the host); the rule table contains 201 ordered regex rules covering 33 vendors, each rule with an official documentation source field.

Core Features

Separation of Identification and Value Filling

The design principle is: after entering the model ID, only perform identification and update the badge, without automatically writing fields; actually writing context, modalities, and reasoning effort requires the user to click the inline “Smart Match” button (batch “Get model” adoption follows the same gate).

When unrecognized, the badge shows “Unrecognized”, and clicking the key will indicate that no suggestions are available to write, it will not guess default values for input / reasoningEfforts.

How the Rule Table Works

The identification entry flow can be summarized as:

① Model Identification  Normalize model name → Ordered regex rule matching → Hierarchical override merge
② Specification Values  Hit and take: Multimodal from public information; Reasoning level from official documentation entries (source in table)
③ Fallback  Miss → Endpoint metadata supplements values → Optional empirical probe → Name heuristics only show candidates, do not auto-write

The rules are not a flat model table, but rather ordered regex + hierarchical overrides. For example, the same ID may inherit series capacity, sub-series tier, and specific variant multimodal information simultaneously. Common org/model prefixes or aliases from third-party aggregation sites will first be normalized by stripping org/, then matched via the ALIASES table for matching name conversion (display names are not changed).

Where to Fill In

Values are written to controlled inputs on the Harness official model rows, and persistence is still triggered by the official “Save” button on that API card. The plugin does not call settings.mutate to directly write to the database, avoiding conflicts with official revisions. After filling, users can manually modify; the plugin tags the dispatched input, and subsequent automatic paths will not overwrite user changes.

Optional Probing

When the configuration option allowProbe is true by default, the interface will display “Test”. Only manual clicks will initiate network connections: resolve keys according to the provider’s apiKeyEnv (or *_API_KEY derived from the provider name) in local credentials, send minimal requests to the baseURL you filled in for that provider, and probe which reasoning levels will be accepted. The identification path does not send external network requests by default.

Profile Switches

On the profile entry (see repository cordis.patch.yml), there are five switches:

Key Default Meaning
enabled true Master switch; when false, controls are not rendered inline
autoApplyContext true Allow filling context window / max output into official rows
autoApplyModality true Allow filling input modalities into official rows
autoApplyReasoning true Allow filling reasoning effort into official rows
allowProbe true Whether to display “Test” (probing only executes on manual click)

Reasoning effort optional values include: off, minimal, low, medium, high, xhigh, max. Input modalities include text, image.

Installation and Activation

The plugin runs with the permissions of the current DSH profile; it is recommended to review the repository source code and MIT license before installation. The community directory page and GitHub repository are published by the maintainer and have no official affiliation with DeepSeek / 幻方. The DSH ecosystem itself is an “everything is a plugin” extension model.

GUI: Plugin Manager → Add Plugin → Paste repository URL or local absolute path.

CLI (commands from repository README, replace <profile> with your profile name):

dsh plugin --profile <profile> add https://github.com/Seller-1990/dsh-model-smart-config

<spec> also supports file: / link: prefixes, .tgz files, or absolute paths (relative paths will be rejected). Uninstallation:

dsh plugin --profile <profile> remove dsh-model-smart-config

After installation or update, the Client bundle and Host inference logic belong to different loading surfaces and cannot be assumed to both be updated just by refreshing the page; you should verify with the actual interface and matching results, and confirm host restart if necessary.

Typical Usage

  1. After installing the plugin, open Settings → Models.
  2. On an existing third-party (pi-ai) provider, select Edit and expand Customized.
  3. In Add API → Custom provider, fetch and adopt models, or manually add a row; no need to save first to see identification badges and Smart match buttons on each row.
  4. Enter the model ID and observe whether the badge recognizes the vendor/series.
  5. Click Smart Match, and with switches enabled, context, modalities, and reasoning effort will be written to official rows; after confirming correctness, use the card’s own Save to persist.
  6. If you need to verify whether reasoning levels are accepted by the endpoint, manually click Test when allowProbe is true (will use local credentials, keys are not written to logs or cross Host↔Client channels).

When creating a new custom API, the bottom extension entry only applies to the new form visible on the current model page; canceling or switching pages will clear button state. Draft mode does not perform real endpoint probing for fictional providers.

Use Cases and Notes

Who it’s for: DSH users who frequently switch third-party aggregated APIs, have many and varied model IDs, and don’t want to repeatedly manually modify per-model context, modality, and reasoning in cordis.patch.yml; scenarios where you want rules with sources and no guessed values when unrecognized.

Known Limitations (from README):

  • When the model row container width is approximately less than 420px, official input fields will be compressed, which is a layout arithmetic result, not a defect that can be fixed by the plugin alone.
  • The rule table updates with plugin versions and is a snapshot; specification changes require waiting for plugin releases or maintaining rules in your own fork.
  • Extremely long custom IDs may be clipped by official input fields, which is unrelated to the plugin.

The Host side provides RPCs such as msc/infer, msc/authoritative, msc/probe; the Client side injects the model settings page from @deepseek-ai/dsh-client-ui-settings-models. Node engine requirement is ^22.19 || >=24 (development/testing environment, see package.json).

Links

Through the above steps, you can use “recognition + one-click matching” in the official model list to supplement modalities and reasoning effort that cannot be obtained from third-party pipelines, while retaining saving rights and manual modification space; unrecognized models will not be silently guessed.

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

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

Xiaoye