Skip to main content

dsh-provider-model-configurator

11Stars0Forks0Issues0Watchers

Added a "Model Pro" page in DSH Web settings for centrally managing model entries from various providers (context, output, input modality, inference tier), with one-click parameter copy from the built-in catalog.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
License
MIT
Branch
main
dsh-plugin

Install

cmdweb profile
$ dsh plugin --profile web add github:LiangYin233/dsh-provider-model-configurator

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin LiangYin233/dsh-provider-model-configurator for me: review the repository at https://github.com/LiangYin233/dsh-provider-model-configurator first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Sentence Description

Adds a "Model Pro" page to DSH Web Settings that centralizes viewing, creating, editing, copying, and deleting model entries under each configured provider. Supports setting context window, max output, input modality, reasoning effort levels, and inference distribution compatibility toggles, with one-click parameter copying from the built-in llm-pi-ai model catalog.

Core Features

  • List explicit model entries under configured providers with current configuration summary, supporting one-click entry into edit or delete mode (src/host/index.js:147-207)
  • Create new model: manually set display name, context window, max output, input modality (text/image), reasoning effort level, and compatibility toggle after entering model ID (src/host/index.js:210-325)
  • Copy & Fill: Top "Use Model Preset" button opens source selector to choose a model from built-in catalog or another provider, pre-filling context, output, modality, and reasoning effort into the form (src/client/page.tsx:431-480)
  • Reasoning effort controlled dropdown: Enumerated values limited to off / minimal / low / medium / high / xhigh / max, each level requires actual request field value (wire value) to avoid typos (src/shared/thinking.js:13-14 / src/host/index.js:255-263)
  • Inference distribution compatibility toggle: Can explicitly write thinkingFormat (openai / deepseek / openrouter / together / zai / qwen / string-thinking / ant-ling) and supportsReasoningEffort (true / false / unset), only read by openai-completions inference distribution (src/shared/thinking.js:16-17 / src/host/index.js:267-283)
  • Unset fields maintain "inherit from catalog" semantics: empty / unchecked fields will not write explicit default values, will inherit from catalog entries when applying configuration next time (src/client/model.ts:18-48 / src/host/index.js:310-313)

Technical Implementation

  • Language: TypeScript (Client: src/client/page.tsx / static.tsx / dynamic.ts) + JavaScript (Host: src/host/index.js / dynamic.js / contract.js); build with esbuild (package.json:46-48)
  • Key Dependencies: @deepseek-ai/cordis (plugin runtime), @deepseek-ai/dsh-typert-protocol + @deepseek-ai/dsh-typert-registry (Host RPC & strict schema), @deepseek-ai/dsh-client-runtime + dsh-client-ui-slots (frontend slots & remote calls), @deepseek-ai/dsh-client-locale (zh/en dictionaries) (package.json:53-69)
  • Architecture Pattern: Dual-half Cordis Bundle plugin — cordis.patch.yml mounts dsh-provider-model-configurator at web Profile bundle layer; Host half instantiates ModelConfiguratorRuntime (inherits from TypertRemoteService) in apply(ctx), and registers 6 strict descriptors via ctx.typert.register(TYPERT_MANIFEST); Client half gets Remote handle via ctx.remote.$mount, and registers "Model Pro" page via slots.inject('settings.section', ...) (slot order = 11) (src/host/index.js:384-387 / src/client/static.tsx:43-87 / cordis.patch.yml:4-6)
  • Entry Files: Host entry lib/index.js (built from src/host/index.js); Client entry lib/client.js (built from src/client/static.tsx); also dynamic plugin version src/host/dynamic.js + dist/dynamic-client-body.js (from src/client/dynamic.ts) as side track for cordis_define dynamic activation (src/host/dynamic.js:14 / src/client/dynamic.ts:7)

Use Cases

After using DSH Web for a while, users have already set up several providers through the Models page (DeepSeek / Alibaba Cloud Bailian / self-hosted OpenAI compatible endpoints, etc.), but each model entry's context window, reasoning effort, and inference distribution compatibility toggle either require manual settings.yaml edits, or are limited by fields provided by DSH's built-in UI. This plugin moves "modifying a model entry" to the settings page in form format, and allows copying parameters directly from similar models in the built-in catalog, eliminating the need to check documentation or browse settings.yaml.

Prerequisites & Compatibility

DependencyMinimum VersionDescription
DSH>=0.0.1 (declared in dsh.plugin.json#engines.dsh)Actually requires host to have llm-pi-ai adapter loaded, and satisfy peerDependencies: @deepseek-ai/cordis ^4.0.1-rc.1, @deepseek-ai/dsh-typert-protocol, @deepseek-ai/dsh-typert-registry, @deepseek-ai/dsh-client-runtime, @deepseek-ai/dsh-client-ui-slots, @deepseek-ai/dsh-client-locale, @deepseek-ai/dsh-api-gateway (package.json:53-69 / dsh.plugin.json:6-8)
Node^22.19 or >=24Declared in package.json#engines.node (package.json:50-52)
PlatformCross-platformOnly operates on Web (dsh.client.platform = "web"), no platform check in source code
Native ModulesNoneSource code and dependencies are pure JS / TS

Installation

dsh plugin --profile web add github:LiangYin233/dsh-provider-model-configurator

Configuration Options

This plugin requires no additional configuration. All "target provider list / context / reasoning effort / write toggle" required by the page are read from the host's loaded llm-pi-ai adapter and settings.writable state. After host configuration is complete, it can be used directly in the settings page.

Fields operable within the plugin (when editing a model entry in "Model Pro" page):

FieldTypeDescriptionDefault Value
Model ID (id)StringUnique identifier for the entry, required when creating, cannot be changed when editingEmpty
Display Name (name)StringFriendly name displayed in model list; leave empty to not write this fieldEmpty (inherit from catalog)
Context Window (contextWindow)Integer (>0)In tokensEmpty (inherit from catalog)
Max Output (maxTokens)Integer (>0)In tokensEmpty (inherit from catalog)
Input Modality (input)Enum checkboxes text / imageMarks what input modalities the model accepts; checking "unset" means not writing this fieldUnset (inherit from catalog)
Reasoning Effort (reasoningEfforts)One of off / levels / unsetoff = mark as non-reasoning model; levels = check at least one of off / minimal / low / medium / high / xhigh / max and fill in wire value; unset = do not write this fieldUnset (inherit from catalog)
Compat: Thinking Format (compat.thinkingFormat)Enumopenai / deepseek / openrouter / together / zai / qwen / string-thinking / ant-ling / unset; only read by openai-completions inference distributionUnset (auto-detect)
Compat: Accept reasoning_effort (compat.supportsReasoningEffort)Boolean / UnsetOnly read by openai-completions inference distributionUnset (auto-detect)

FAQ

Q: After installation, where do I access this page?

A: After installation, restart the Web service and refresh the page. "Model Pro" entry will appear in Settings → left navigation bar (located after Models page). Click to enter (src/client/static.tsx:13-14).

Q: What is the relationship between this page and DSH's built-in Models settings page?

A: It only modifies entries in the existing "provider model list" (context, max output, input modality, reasoning effort, inference distribution compatibility toggles). It doesn't create providers, modify API keys, or replace the Models page's provider creation flow. The plugin reads the target list from providers you already created in the Models page (src/host/index.js:147-207).

Q: How does the "Use Model Preset" button work?

A: Clicking "Use Model Preset" opens a popup, first select source provider, then select model. Registered providers use llm.listModels, unregistered (dormant) providers use llm.discoverModels to read catalog metadata. After selection, context, output, modality, and reasoning effort are pre-filled into the form, which can be further modified manually (src/host/index.js:69-93).

Q: When editing an existing model, what happens to fields not shown in the form?

A: They are preserved. The plugin only overwrites fields you fill in (name, contextWindow, maxTokens, input, reasoningEfforts, compat). Other fields (like description, tools) remain unchanged. If you leave a field empty in the form, that field will be deleted from the old entry and revert to catalog inheritance, not keep the old value (src/host/index.js:308-313).

Q: What happens when deleting the last model entry of a provider?

A: For built-in catalog providers, the explicit list will be cleared and revert to built-in catalog. For custom providers, the plugin will refuse to delete and prompt "Must keep at least one explicit model entry" (src/host/index.js:355-365).

Q: What is the relationship between reasoning effort levels and thinking format?

A: Reasoning effort levels are what the model itself declares as "thinking intensity" (one of off / minimal / low / medium / high / xhigh / max + corresponding wire value). thinkingFormat / supportsReasoningEffort only affect how inference distribution maps these levels to request fields on the openai-completions path. Default values are auto-detected from catalog entries or baseURL (src/shared/thinking.js:13-17).

Q: What happens when the plugin is in read-only mode (settings.writable=false)?

A: A "Current setting is read-only" warning appears at the top. All edit / delete / apply config buttons will be disabled. Remote calls will be directly rejected by host and return "Settings read-only, cannot write model configuration" (src/host/index.js:215).

Difficulty Level

Beginner — The page is a regular form with all options exposed via dropdowns or input boxes. Users don't need to understand internal concepts like Typert / settings.mutate / llm-pi-ai adapters. The only advanced point to understand is the "unset (inherit from catalog)" semantics, to avoid mistaking empty for deleting values.

Known Issues & Limitations

  • Once a built-in catalog provider has explicit model entries written to its list, subsequent catalog updates won't automatically merge into that list. Only after deleting all explicit entries will it revert to the built-in catalog (README.md:34 / src/host/index.js:288-302)
  • When deleting to zero explicit entries, custom (non-catalog) providers retain a hard limit of at least one entry, cannot be completely cleared (src/host/index.js:355-365)
  • The form only exposes fields like name / contextWindow / maxTokens / input / reasoningEfforts / compat. Fields like description and tools in model entries cannot be edited through this page, can only be preserved or deleted (src/host/index.js:308-313)
  • This plugin only operates on Web platform (dsh.client.platform: "web"). Desktop / terminal hosts don't use the settings.section slot (package.json:18-26)
  • Version 0.3.9's dsh.plugin.json#engines.dsh is declared as >=0.0.1, very loose. Actual usability is constrained by peerDependencies (cordis ^4.0.1-rc.1, dsh-typert-protocol, dsh-typert-registry, etc.) (package.json:53-69 / dsh.plugin.json:6-8)

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/LiangYin233/dsh-provider-model-configurator)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory