In the DeepSeek Harness (DSH) ecosystem, model management is often scattered across multiple settings and components, lacking a unified entry point. The yhyfhgs/dsh-model-hub plugin aims to unify provider sign-in, model catalog, and session routing into a secure, loopback-only /model-hub RPC channel. It takes over lifecycle management and model selection while preserving access to official DSH settings, providing a centralized configuration and routing experience.
Core Features¶
The plugin provides the following specific capabilities:
- Provider Sign-in: Performs OAuth / device code authentication directly in the browser, with real-time attempt tracking, prompt dialogs, and a 30-minute host timeout.
- Provider Lifecycle: Provides management operations such as activation, deactivation, sign-out, and usage history, all protected by impact confirmation dialogs.
- Provider Customization: Allows editing API keys (securely stored via
credentials.set), Base URL, protocol, display name, and per-route model mappings. - Rich Model Catalog: Extends the native
llm.modelsschema, preserving fields such asinputModalities,contextWindow, anddefaultMaxTokens. - Session Selection & Routing: Supports in-memory session model selection using
{ prepend: true }hook priority. Subagents follow a three-tier routing policy. - Thinking Effort Control: A dynamic slider automatically calibrated to the reasoning levels supported by each model.
- Fast Mode: A metadata-driven toggle to declare models that use the accelerated service layer.
- Built-in Providers: Built-in support for
qwen-code(RFC 8628) andcodex(OpenAI Codex). - Bilingual Interface: Native support for Simplified Chinese and English UIs, following the Harness Shell language preference.
- Loopback Security: All
/model-hubendpoints are strictly bound toauthority: 'loopback', with strict payload validation using Zod.
Installation & Activation¶
Before installing, make sure pnpm is available in PATH, because the dsh plugin command invokes pnpm under the hood.
- Run the installation command:
dsh plugin --profile web add @fhxgs/dsh-model-hub
- After installation, you must restart the profile, because configuration file changes do not support hot reload.
Typical Usage¶
- Open the DSH Web UI on the same machine running DSH (all endpoints require local loopback access).
- Go to Settings -> Model Hub -> Providers, select a provider, and complete the sign-in flow.
- Click Activate on the provider card to enable routing.
- Switch to the Catalog tab and select the models you want to appear in the picker.
- In any chat session, select a model and reasoning effort from the bubble or by entering the
/modelcommand.
Configuration¶
The plugin manages configuration under the model-hub settings namespace. Configuration items include:
- picker: Controls model visibility.
modesupportsall(default) orinclude(explicit whitelist). Theincludelist defines allowed models. - fastMode: A list of models to enable accelerated service layer routing.
- preferredEffort: An optional default reasoning effort level.
- subagent: Inherited or provider/model/effort-specific configuration.
Built-in provider configuration is stored in a separate model-hub-providers namespace to avoid invalidating the catalog cache.
Notes¶
- Environment Dependency: The
dsh plugincommand depends onpnpm. Ensurepnpmis available after runningcorepack enable pnpm. - Security: Credentials go directly to secure storage and are never exposed in logs or state snapshots.
- Loopback Limitation: All
/model-hubendpoints are local-only.