Introduction¶
DeepSeek Harness (DSH) uses a plugin-based architecture that allows developers to extend its functionality through plugins. When deploying large models locally, the model service usually needs to be exposed to Harness through an OpenAI-compatible interface. The robbywang25/dsh-llm-mlx plugin provides this connectivity. It routes local MLX-LM or MLX-VLM models into DSH’s model system through a built-in OpenAI adapter, solving the problem of local model integration.
Plugin Overview¶
- Plugin name:
robbywang25/dsh-llm-mlx - Core functionality: A DeepSeek Harness plugin for local MLX-LM and MLX-VLM models. Loopback-only by default, with optional hosted server startup.
- Maintainer:
robbywang25 - License: MIT
Core Features¶
The plugin mainly provides the following capabilities:
- Provides the
local-mlxmodel route and connects to local models through DSH’s OpenAI-compatible adapter. - Optionally starts
mlx_lm.serverormlx_vlm.server, with DSH managing their lifecycle. - Suitable for Apple-silicon macOS environments.
- Binds the server to
127.0.0.1by default. - Fixes the
app.asar.unpackedpath issue in the macOS Desktop environment and replaces the default subprocess provider. - Supports reusing an existing OpenAI-compatible server without starting it from DSH.
Installation¶
Installing the plugin requires selecting the corresponding profile based on DSH’s runtime environment.
# Web Profile 安装
dsh plugin --profile web add https://github.com/robbywang25/dsh-llm-mlx/releases/download/v0.4.0/dsh-llm-mlx-0.4.0.tgz
# Desktop Profile 安装
dsh plugin --profile desktop add https://github.com/robbywang25/dsh-llm-mlx/releases/download/v0.4.0/dsh-llm-mlx-0.4.0.tgz
Configuration and Usage¶
The plugin provides two operating modes: hosted mode and reuse mode.
Mode 1: Hosted Mode (DSH Starts the Model Service)¶
In this mode, DSH is responsible for starting and managing the MLX server process. Configure environment variables or a configuration file to specify the model path and Python interpreter.
- Set environment variables:
export DSH_MLX_MODEL_PATH=/absolute/path/to/your-mlx-model
export DSH_MLX_PYTHON=/absolute/path/to/python
- Start DSH:
dsh web
Or configure persistent settings in cordis.patch.yml:
- id: llm-mlx-runtime
config:
autoStart: true
serverEngine: mlx-lm # 或 mlx-vlm
modelPath: /absolute/path/to/your-mlx-model
pythonExecutable: /absolute/path/to/python
Mode 2: Reuse an Existing Server¶
If an MLX server is already running, DSH can connect to it directly without taking over its process.
- Manually start the MLX server (using MLX-LM as an example):
python -m mlx_lm server \
--model /absolute/path/to/your-mlx-model \
--host 127.0.0.1 \
--port 18080 \
--max-tokens 512
- Configure it in DSH settings. In Settings → Models → Local MLX, enter any non-empty placeholder (for example,
local-only), and select MLX Local Model in the session. DSH will connect tohttp://127.0.0.1:18080/v1.
System Requirements and Notes¶
To use this plugin, the following conditions must be met:
- Version requirement: The DeepSeek Harness version must be
0.1.0-rc.6or0.1.1-rc.1+. - Environment requirements:
- Hosted-mode startup is supported only on Apple-silicon macOS.
- A local Python environment is required, with
mlx-lmormlx-vlminstalled (depending on the selected model type). - Local MLX model weights must already be downloaded and configured.
- Security and limitations:
- Read Only and Workspace Write operations still use DSH’s built-in Seatbelt restriction mechanism.
- Process providers on Linux and Windows are not affected by this plugin.
- Data note: The plugin itself does not contain any model weight files.