Local Model Worker: On-Demand Launch of Local Model Services

Introduction

DeepSeek Harness (DSH) requires model providers to be online at all times by default. For local GPU models, this is impractical: loading takes tens of seconds, consumes several GB of VRAM, yet the model sits idle most of the time. The Local model worker plugin configures a local server within DSH so that it only starts when actually needed and automatically unloads after a period of inactivity.

Plugin Scope

This is a DSH plugin maintained by cloudylapis, categorized under model inference. It allows DSH to treat a local OpenAI-compatible model server as an on-demand provider: configure it upfront, spin it up when needed, and tear it down when no longer in use.

Core Features

On-Demand Startup and Idle Unloading

Configure the local server address in Settings → Models. When DSH receives a request targeting that provider, the plugin first starts the server and waits for it to be ready before proceeding. If no new requests arrive and the idle duration exceeds idleMinutes (default: 30 minutes), the server is stopped and VRAM and memory are released.

Multiple Local Backends Supported

Four built-in backends are provided, each with a default address, start command, and stop command:

Backend Default Address Start Command Stop Command
lmstudio http://127.0.0.1:1234/v1 lms server start lms server stop
ollama http://127.0.0.1:11434/v1 ollama serve Process tree
llamacpp http://127.0.0.1:8080/v1 llama-server -m <model file> Process tree
custom Any address Your specified command Your specified command

Unspecified fields will use the backend’s presets. If you write your own start/stop commands, they will override the presets.

Agent Tool and Manual Control

The plugin exposes a local_model tool that agents can use to check server status, start, or stop it manually:

  • local_model with action: "status": Check whether the server is running, the configured provider, and remaining idle minutes
  • local_model with action: "start": Immediately start the server and wait until it is ready
  • local_model with action: "stop": Immediately stop the server

A pill button is also displayed in the UI for manual start/stop.

Configuration Takes Effect Immediately

All fields are available in the card and the plugin Config, and are all volatile (not persisted to disk). Changes take effect on the next request — no DSH restart is needed.

Installation and Activation

Search for “Local model worker” in the DSH plugin marketplace, or install from the shell:

dsh plugin --profile desktop add dsh-local-model-worker

GitHub installation is also supported:

dsh plugin --profile desktop add github:cloudylapis/dsh-local-model-worker

Once installed, go to Settings → Models and configure accordingly.

Typical Usage

  1. Open Settings → Models.
  2. Find the “Local model server” card at the bottom, select a backend (e.g., lmstudio), and save.
  3. Add a provider row above the card. Set the provider ID to local (default), and fill in the Server address with the address shown in the card. Select a model.
  4. Reference that provider’s model in your conversation. The first request will trigger the server to start; after 30 minutes of inactivity, it will be automatically unloaded.

Paths containing spaces or non-ASCII characters (e.g., Chinese directory names, OneDrive folders) require no special handling — the plugin wraps all command-line arguments in quotes.

Use Cases and Notes

Suitable for developers who frequently switch between different local models and don’t want the GPU to be occupied long-term. The plugin runs with the permissions of the current DSH process and does not start the service as a separate process. If the start command pops up a window or requires interactive input, it will not work correctly.

The plugin performs a health check by reading <server address>/models. If the server does not expose this route, you can only start and stop it manually.

When delegating to the model, the conversation needs to allow the corresponding route (subagent-model-selection-settings), set the provider name to local, and fill in the model in the model field.

Limitations

  • One configured endpoint corresponds to one server. To run two local servers, you need two plugin entries with different provider IDs.

Ecosystem Context

DSH’s philosophy is “everything is a plugin.” The community catalog is an independent site with no official affiliation to DeepSeek / High-Flyer.

References

  • Plugin catalog page: https://www.skillhub.cn/plugins/cloudylapis/dsh-local-model-worker
  • GitHub repository: https://github.com/cloudylapis/dsh-local-model-worker
  • README: https://github.com/cloudylapis/dsh-local-model-worker
羽毛球分组比赛记分
小程序二维码

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

Xiaoye