dsh-provider-show: Auto-complete the provider for the current model in the input box

Introduction

When switching models in DSH, the bottom right of the input box usually only displays “Model · Reasoning Intensity”, making it impossible to tell whether the model behind it is the official DeepSeek route, an API route you built yourself, or a third-party model provided by a connector plugin. When multiple plugins register providers, duplicate providers might appear on the same row. The plugin introduced below solves these two problems: it fills in the current model’s provider before “Model · Reasoning Intensity”, and automatically yields to providers that have already been taken over by other plugins.

What is this plugin

dsh-provider-show is a DSH client plugin maintained by MosCloud, version 0.1.1, license MIT, with zero external dependencies. It adds the current model’s provider before “Model · Reasoning Intensity” in the bottom right of the DSH input box. For providers that have already been taken over by other plugins (e.g., WorkBuddy), the plugin does not display them after identification, keeping the whole row consistent with when the plugin is not installed.

Core Features

  • Adds the provider display name to the left of “Model · Reasoning Intensity”, e.g., DeepSeek Account.
  • When a provider has been taken over by a third-party plugin, the plugin no longer draws its own chip to avoid duplication.
  • When a new session has not yet selected a model, it displays the provider of the deployed default model; after sending the first message or switching the model once, it changes to be decided by the session’s own choice.
  • The provider display name is taken from displayName in the directory by default, and can be shortened via shortNames.
  • The ownership determination and text selection are pure functions, shared between Host and Client implementations.

Installation and Enablement

Execute the installation command in the DSH client, replacing <your-profile> with the actual profile used:

dsh plugin --profile <your-profile> add dsh-provider-show

You can also enter the package name or GitHub repository address in “Add Plugin” on the plugin management page. After installation, you must refresh the page because the client module is new and will not load without a refresh.

When developing from source, use a local directory so changes take effect immediately:

dsh plugin --profile <your-profile> add /path/to/dsh-provider-show

Uninstall via the plugin management page or remove from the profile’s plugin manifest. The README mentions that npm 12 will leave a placeholder version 0.0.0-stage (339 bytes), a product of its staging release mechanism; latest points to the real release version, and installation is unaffected.

Configuration

Configuration is written under the plugin entry in cordis.patch.yml of the profile. Each item has a default value, but a single configuration replaces the entire config object, so only write the keys that need to be changed:

- id: dsh-provider-show
  name: dsh-provider-show
  config:
    enabled: true                    # Master switch, default true

    shortNames:                      # Provider short names, override display names in directory
      volcano-api: Volcano

    overrides:                       # Force handling for certain providers
      some-connector-provider: third-party   # Yield to the plugin that took it over
      another-provider: mine                 # Display even if detection says it was taken over
      noisy-provider: hide                   # Do not display, but do not claim it was taken over

    coreNamespaces:                  # Host's own settings namespaces, expandable on host upgrade
      - llm-pi-ai
      - llm-deepseek
      - llm-deepseek-account

Ownership Determination Rules

Whether a provider has been taken over by a third-party plugin is determined by the Host after reading the LLM directory, with priority from top to bottom:

Order Rule Result
1 overrides[providerId] explicitly configured third-party yields / mine displays / hide does not display
2 settingsNs is not in coreNamespaces Judged as taken over by a plugin, yield
3 Not found in directory, or directory unreadable Judged as unknown, display normally (fail-open)

settingsNs is the “Loader entry id” that registered this provider:

  • llm-pi-ai: API routes you built yourself in settings, e.g., Volcano, OpenRouter, or any OpenAI-compatible service.
  • llm-deepseek / llm-deepseek-account: The two official DeepSeek routes.
  • Any other value: Registered by a plugin using its own entry id, e.g., dsh-connect-workbuddy.

The third rule chooses fail-open because missing display is just incomplete information, while a misjudgment would cause all providers to not display. If the default channel is taken over by a third-party plugin, it still yields.

Architecture

File Responsibility
lib/ownership.js Ownership determination and text selection, pure function, zero import, shared by Host/Client
lib/index.js Host side: read LLM directory -> decide -> read-only route GET /plugins/dsh-provider-show/providers
lib/client.js Client side: register conversation.input.right, read Host documentation and render

The layering principle is: runtime facts invisible to the browser (settingsNs) are decided by the Host, the Client only consumes the conclusion, and the rule has only one implementation. See docs/design.md for design trade-offs.

Development and Verification

npm test        # Unit + Behavior tests (Pure Node, no DSH runtime needed)
npm run check   # Syntax check + static validation + all tests

Each check in scripts/verify.mjs corresponds to a rule that is only easily exposed at runtime: manifest integrity, icon legality, locale non-placeholder text, Client does not import Harness Client package, styles only use theme tokens and have a width upper bound, route is read-only GET and held by scope.effect, ownership rule has only one implementation, typography metrics are consistent with the host and displacement compensation is prohibited. Zero external dependencies, so there is no installation step in CI, run the same checks directly after a clean checkout. Runtime environment is Node 22 / 24.

Applicable Scenarios and Notes

Suitable for DSH users who need to quickly identify the current model source in a multi-provider environment, and also suitable for developers who want to create similar client plugins by referring to the “yield” mechanism. The plugin runs with the current DSH process permissions; check the source code and license before installing.

Known limitations are as follows:

  • The chip causes the model name to fold into an icon earlier (max-width: 140px, the host determines folding based on the entire row width).
  • When conversation.input.activity expands the whole row, the host hides the entire group of standardControls, and the chip hides with it.
  • The provider display name is taken from displayName in the directory by default; configure shortNames if you want it shorter.
  • Determination relies on third-party plugins registering providers using their own settingsNs; if a plugin reuses core namespaces, please explicitly mark it using overrides.
  • The read-only route only accepts same-origin requests from the current page; it is an exact route under /plugins/, with higher priority than the client module’s /plugins prefix route, and they do not conflict.

Summary

dsh-provider-show uses an ownership rule where the Host makes decisions and the Client only consumes, filling in the current model’s provider in the input box, while remaining silent for providers already taken over to avoid duplicate display. It is maintained on GitHub: https://github.com/MosCloud/dsh-provider-show , and the community directory page: https://www.skillhub.cn/plugins/MosCloud/dsh-provider-show .

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

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

Xiaoye