Introduction

The plugin mechanism of DeepSeek Harness (DSH) allows splitting host capabilities into independent modules for integration. One common requirement is: instead of configuring another set of API keys or settings segments within DSH, directly reuse the locally logged-in CLI. dsh-llm-qoder is the adapter for this: it connects DSH’s LLM requests to the local qodercli, allowing host-side model selection, sessions, tool calling, and compression recovery to continue operating under DSH’s plugin mechanism.

What is this

dsh-llm-qoder is a DSH plugin with the package name @jiamingzang/dsh-llm-qoder and an MIT license. It solves the problem of allowing DSH’s LLM interface to route through qoder and qoder-byok provider routes, reusing the local qodercli login state without needing API keys or settings segments.

Core Features

The capabilities provided by the plugin include:

  1. Configuration-free Access
    Fully reuse the local qodercli login state without requiring API keys or settings segments.

  2. Dual Routing
    Registers two provider routes: qoder and qoder-byok, for the model selector to choose from.

  3. Persistent Sessions
    The host session corresponds to a warm qodercli session; it is evicted using an Insertion-Order LRU within the maxSessions limit.

  4. Tool Bridging
    Host tools are exposed to the inner model via an in-process MCP server named dsh-host.

  5. Model Directory
    Fetches available models from qodercli in real-time; falls back to a static directory if fetching fails.

  6. Reasoning Effort and Context Window
    Reports reasoning efforts, default tiers, and context window for the model selector to switch between.

  7. Side-channel Requests
    Side-channel requests such as title generation and compaction use cold, one-time calls.

  8. Overflow Recovery
    Context limits exceeded are mapped to CONTEXT_WINDOW_EXCEEDED, allowing the harness to perform overflow recovery.

Default configuration items are as follows:

maxSessions: 8
modelCacheTtlSeconds: 300

Where:

maxSessions

represents the upper limit of warm inner qodercli sessions maintained simultaneously; when the limit is exceeded, sessions are evicted using an Insertion-Order LRU.

modelCacheTtlSeconds

represents the cache freshness duration in seconds for the CLI model directory.

Installation and Activation

Prerequisites

The local machine must first install and log in to qodercli, and be able to run:

qodercli --version

Getting the Plugin Package

Download from this repository’s Releases:

jiamingzang-dsh-llm-qoder-<version>.tgz

Or generate it yourself by running pnpm pack in the repository root directory.

Adding to Target Profile

Run:

dsh plugin --profile <profile> add jiamingzang-dsh-llm-qoder-<version>.tgz

Where <profile> and <version> need to be replaced according to the actual environment.

Approving Build Scripts for First-time Installation

The first installation involves build scripts for @qoder-ai/qoder-agent-sdk. pnpm 11+ will intercept build scripts by default and throw an error.

At this point, you need to change the value corresponding to allowBuilds in pnpm-workspace.yaml to true, for example:

allowBuilds:
  '@qoder-ai/qoder-agent-sdk': true

Then, re-run the above add command to complete the installation.

Verifying Installation

Run:

dsh --profile <profile> --dump-config | grep llm-qoder

If a plugin entry appears in the output, it means the profile has loaded the plugin. Then restart the service; the following should appear in the model selector:

qoder
qoder-byok

Manual Mounting

If not using the plugin command, you can also declare it directly in cordis.yml or the patch layer:

- id: llm-qoder
  name: '@jiamingzang/dsh-llm-qoder'

Typical Usage

  1. Select Routing
    Select a model under qoder or qoder-byok in the model selector or the Models settings page.

  2. Switch Context Window and Reasoning Effort
    The plugin reports the CLI’s reasoning efforts, default tiers, and context window, so these options can be switched in the model selector and sent down with every request.

  3. Model Directory Recovery
    If real-time model directory fetching fails, the plugin falls back to a static directory. Failed fetches are not cached; once the CLI is recovered, the real-time directory is automatically restored without needing to restart the service.

Context Overflow and Compression

The warm inner session accumulates host history, and the inner model may also encounter context limits. The plugin reports such failures as:

CONTEXT_WINDOW_EXCEEDED

This allows the harness’s overflow recovery process to take over, rather than letting the current turn fail directly.

Automatic overflow recovery requires loading the following in the deployment:

dsh-compaction-basic
dsh-token-meter

If the compression plugin is not installed, turns where the context limit is exceeded will still fail, requiring opening a new session or manual compression.

Use Cases and Considerations

This plugin is suitable for developers who have already installed and logged in to qodercli locally and want DSH to directly reuse that login state.

It is recommended to note the following before installation:

  1. The plugin runs within the DSH process and accesses the local qodercli and its login state with the current dsh process permissions;
  2. Before installation, check the source code, dependencies, and MIT license;
  3. The GitHub repository address and package name in the materials have case and name differences: the GitHub URL uses JiamingZang/dsh-llm-qodersdk, the package name uses @jiamingzang/dsh-llm-qoder, and the installation package filename uses jiamingzang-dsh-llm-qoder-<version>.tgz. The actual installation is based on the filename of the downloaded release package.

Related Links

The links provided here are for the community directory page and the GitHub repository, not equivalent to the official app store.

  • Community Directory: https://www.skillhub.cn/plugins/JiamingZang/dsh-llm-qodersdk
  • GitHub: https://github.com/JiamingZang/dsh-llm-qodersdk