dsh-llm-lmstudio
LM Studio (OpenAI-compatible local server) adapter plugin for DeepSeek Harness
- Stars
- 0
- Language
- TypeScript
- Created
- Aug 28, 2026
- Updated
- Aug 29, 2026
Introduction
This plugin is AI generated.
dsh-llm-lmstudio
A standalone LM Studio plugin for DeepSeek Harness. It registers the
lm-studio provider route against a local LM Studio server
(OpenAI-compatible endpoint, default http://localhost:1234/v1), fetches the
server's loaded-model catalog live, and exposes a llm-lmstudio settings
section that the web Models page writes.
Extracted from the in-tree packages/llm/llm-lmstudio adapter (branch
feat/llm-lmstudio). The harness's own files stay identical to upstream —
the adapter lives in this plugins/ folder, untouched by the harness build.
Verified against harness master 0.1.2-alpha.1.
This fork ships the plugin under plugins/dsh-llm-lmstudio/, so a fresh
clone already has it. Enable it once per profile:
pnpm dsh plugin --profile web add link:./plugins/dsh-llm-lmstudio
The same plugin also lives alone on the branch feat/llm-lmstudio-plugin
(upstream master plus only this folder), ready to PR or move into its own
repository — if it gets one, add the dsh-plugin GitHub topic for
discoverability.
Requirements
- The harness checkout one level up (
../..), withpnpm installandpnpm run buildcompleted there (the harness's tsx source launcher runs this plugin's TypeScript directly — no build step here). - LM Studio running locally (or set
baseURLto wherever it listens).
Install
From the harness root, link the plugin into a profile. For the web UI, the
profile is literally named web:
pnpm dsh plugin --profile web add link:./plugins/dsh-llm-lmstudio
Omit --profile web only if you boot a different named profile. This
installs the plugin's dependency links (they point back into the harness
checkout so the plugin shares the harness's exact runtime copies — never a
second copy of @deepseek-ai/dsh-*) and appends this bundle to the profile's
bundle list. cordis.patch.yml here supplies the llm-lmstudio row; the
loader resolves the row against the profile like any installed plugin.
Alternative without installing: run the web UI with an overlay that points
the row at this checkout directly. On Windows the row value must be a
file:// URL, e.g. a patch file containing
- insert:
- id: llm-lmstudio
name: 'file:///C:/<path>/DS-Harness/plugins/dsh-llm-lmstudio/src/index.ts'
passed as pnpm dsh web --patch <that-file>.
Configure
Open the web UI's Models page and fill in the llm-lmstudio section:
baseURL— endpoint base; defaults tohttp://localhost:1234/v1.apiKeyEnv— name of an environment variable holding an API key, if your server requires one; leave empty for a keyless local server (the adapter sends the dummy bearer LM Studio accepts).models— optional per-id overrides for context window, max tokens, labels, and vision capability; the live server listing fills the rest.retryPolicy,streamIdleTimeoutMs,discoveryTimeoutMs— as documented insrc/index.ts.
The lm-studio provider then appears in the model picker alongside the
in-box providers.
Develop
From this directory (Node ≥22.19):
pnpm install --ignore-workspace # once: link deps + eventsource-parser
npm run typecheck # tsc -b against the harness projects
npm run test # vitest suites with a mock LM Studio server
Both scripts borrow tsc/vitest from the harness checkout's
node_modules. The tsconfig.json project references resolve every
@deepseek-ai/* import through the harness's own compiled declarations, so
types always match the code the harness actually runs.