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:
-
Configuration-free Access
Fully reuse the localqoderclilogin state without requiring API keys or settings segments. -
Dual Routing
Registers two provider routes:qoderandqoder-byok, for the model selector to choose from. -
Persistent Sessions
The host session corresponds to a warmqoderclisession; it is evicted using an Insertion-Order LRU within themaxSessionslimit. -
Tool Bridging
Host tools are exposed to the inner model via an in-process MCP server nameddsh-host. -
Model Directory
Fetches available models fromqodercliin real-time; falls back to a static directory if fetching fails. -
Reasoning Effort and Context Window
Reportsreasoning efforts, default tiers, andcontext windowfor the model selector to switch between. -
Side-channel Requests
Side-channel requests such as title generation and compaction use cold, one-time calls. -
Overflow Recovery
Context limits exceeded are mapped toCONTEXT_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¶
-
Select Routing
Select a model underqoderorqoder-byokin the model selector or the Models settings page. -
Switch Context Window and Reasoning Effort
The plugin reports the CLI’sreasoning efforts, default tiers, andcontext window, so these options can be switched in the model selector and sent down with every request. -
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:
- The plugin runs within the DSH process and accesses the local
qodercliand its login state with the currentdshprocess permissions; - Before installation, check the source code, dependencies, and MIT license;
- 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 usesjiamingzang-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