In the DeepSeek Harness (DSH) ecosystem, the llm-pi-ai provider adapter provides basic model invocation capabilities but lacks an intuitive configuration and management interface. dsh-model-pro is a dynamic Cordis plugin for DSH. It adds a “Model Pro” entry on the Settings page and provides a full-lifecycle management UI for the llm-pi-ai provider.
The plugin supports creating and editing providers, enabling/disabling providers, remote model discovery, connectivity testing, smart routing, and composite providers, and ensures zero loss of model data during uninstallation.
Core Features¶
Provider Management¶
The plugin provides a card-based list and supports CRUD (create, read, update, and delete) operations for providers.
- Enabling and Disabling: Supports one-click status toggling. A disabled provider is hidden from the model selector and moved into the disabledProviders configuration section, while its configuration data is fully preserved.
- Field Editing: Fields such as baseURL, API protocol, apiKeyEnv, and displayName can be edited individually.
- Custom Request Headers: HTTP request headers can be customized per provider. authorization and api-key are automatically populated by the adapter and do not need manual maintenance.
Keys and Credentials¶
- Encrypted Storage: API Keys pasted in the GUI are encrypted with the AES-256-GCM algorithm before being written to the configuration file and are also stored in the DSH credentials service.
- On-demand Decryption: The configuration file stores only ciphertext, shown by default as a masked value. Click “Show Stored” to decrypt and view it.
Model Management¶
- Remote Model Discovery: Supports retrieving the remote model list via
GET /models, with select all, deselect all, and inverse selection. - Bulk Write: Supports replacing or merging selected models into the provider’s explicit model list.
- Forward Name Mapping: A local forwarding name can be configured for specific models. When selected, the mapped model name is sent to the Provider.
Connectivity Testing¶
On the “Test” page, a real inference request is sent to the selected model. The test follows the complete credential verification, request header injection, and protocol chain, and returns latency, stop reason, and the actual response content, allowing availability to be confirmed before relying on the model.
Smart Routing and Composition¶
- Smart Routing: Supports aggregating models from multiple Providers and offers five routing strategies:
priority(sequential preference with fallback),weighted(weighted random),round-robin(smooth weighted round-robin),min-latency(priority for historically low latency), andsticky(session stickiness). Supports configuring weights, enable switches, health awareness, and fallback counts. - Seamless Fallback: When the preferred target is unreachable (connection refusal, HTTP error, empty response, or timeout), the system automatically switches to the next target without any impact on the conversation.
- Composite Providers: Supports merging models from multiple Providers into a virtual Provider, with union and intersection modes. The intersection mode is especially suitable for multi-upstream backup of the same model.
Observability and Health¶
- Health Probing: Sends a minimal request to each target (Provider + Model), marks the
up,down, andprobingstates and consecutive failure counts, and health-aware routing automatically skips targets in the Down state. - Observability Dashboard: Provides in-session request logs (routing → target, latency, tokens) and aggregated statistics (call count, success rate, average latency, and total tokens).
- Conversation Badges: Can be enabled by a switch to display the actually selected Provider/Model below each turn, with an “Automatically switched” label when a seamless fallback occurs.
Installation and Activation¶
DSH plugin management commands are forwarded to pnpm. A Profile must be specified during installation (usually web for the Web GUI).
Install from npm (recommended):
dsh plugin --profile web add npm:dsh-model-pro
Note: The
npm:prefix is required. The package on the registry already includes a pre-builtdist/directory, so installation does not trigger build scripts. If the prefix is omitted, pnpm may resolve it as a git source, causing build script execution to be blocked.
After installation, reopen the DSH Web GUI. You can see the Model Pro entry under Settings on the left side.
Typical Usage¶
- Create a Provider: Go to Model Pro, click Add Provider in the top-right corner, and follow the 3-step wizard to enter the name, connection information, and credentials.
- Pull Models: Go to the Models tab, click Fetch Remote Models, select the models you need, and choose Replace with Selected or Merge Selected.
- Connectivity Test: On the Test tab, select a model, click Run Test, and verify the latency and response content.
- Configure Routing: Under Smart Routing → Routing Console, create a named route, add targets, and configure strategies and weights.
- Composite Capabilities: On the Composite Providers page, select multiple Providers, choose union or intersection mode, and use them in the model selector as
composite / composite_name::model. - Observability and Probing: On the Probing page, update target health status, and view statistics and logs on the Observability Dashboard.
Notes¶
- Uninstallation Safety: When the plugin is uninstalled, each provider in
disabledProvidersis automatically restored as-is toproviders, ensuring no configuration data loss. - Key Management: The encrypted master key is stored in the credentials service and is never regenerated, so previously stored ciphertext remains decryptable after reinstalling the plugin.
- Permissions and Source Code: The plugin runs with DSH process permissions. It is recommended to review the source code and license before installation.
Summary¶
dsh-model-pro solves the problems of cumbersome llm-pi-ai provider configuration and lack of testing and monitoring by providing a visual management interface and rich orchestration capabilities. It supports everything from basic CRUD to complex smart routing and composition, helping developers manage multi-model invocation chains more securely and efficiently.