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.models schema, preserving fields such as inputModalities, contextWindow, and defaultMaxTokens.
  • 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) and codex (OpenAI Codex).
  • Bilingual Interface: Native support for Simplified Chinese and English UIs, following the Harness Shell language preference.
  • Loopback Security: All /model-hub endpoints are strictly bound to authority: '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.

  1. Run the installation command:
    dsh plugin --profile web add @fhxgs/dsh-model-hub
  1. After installation, you must restart the profile, because configuration file changes do not support hot reload.

Typical Usage

  1. Open the DSH Web UI on the same machine running DSH (all endpoints require local loopback access).
  2. Go to Settings -> Model Hub -> Providers, select a provider, and complete the sign-in flow.
  3. Click Activate on the provider card to enable routing.
  4. Switch to the Catalog tab and select the models you want to appear in the picker.
  5. In any chat session, select a model and reasoning effort from the bubble or by entering the /model command.

Configuration

The plugin manages configuration under the model-hub settings namespace. Configuration items include:

  • picker: Controls model visibility. mode supports all (default) or include (explicit whitelist). The include list 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 plugin command depends on pnpm. Ensure pnpm is available after running corepack enable pnpm.
  • Security: Credentials go directly to secure storage and are never exposed in logs or state snapshots.
  • Loopback Limitation: All /model-hub endpoints are local-only.