Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepSeek Harness + LM Studio

Run DeepSeek Harness against local Qwen models in LM Studio with correct tool calling, reasoning fields, model capabilities, and context limits.

DeepSeek Harness already speaks the OpenAI Chat Completions protocol. This project does not proxy tokens or replace its tool executor. It writes an exact LM Studio provider profile and tests the same streamed two-turn tool loop that the agent uses.

Quick start

Requirements: Node.js 22.19 or newer, DeepSeek Harness, LM Studio 0.4.8 or newer, and a local language model.

git clone https://github.com/jtc268/deepseek-harness-lmstudio.git
cd deepseek-harness-lmstudio
npm install
npm run doctor
node ./bin/dsh-lmstudio.js configure --model qwen3.8-27b
node ./bin/dsh-lmstudio.js smoke --model qwen3.8-27b

configure backs up ~/.dsh/settings.yaml, adds the lmstudio provider, and selects the requested model as the default for new DeepSeek Harness sessions. Model changes in the Harness settings file apply to the next request.

Use install to configure and test in one command:

node ./bin/dsh-lmstudio.js install --model qwen3.8-27b

What it maps

The model receives standard OpenAI function definitions through tools. LM Studio applies the Qwen chat template, parses Qwen's response into tool_calls, and streams those calls back. DeepSeek Harness executes the requested tool and sends the result to the model.

The generated profile also handles details that a plain base URL misses:

  • Reads model IDs from GET /v1/models.
  • Reads tool-use, vision, reasoning, and context metadata from GET /api/v1/models.
  • Uses the loaded context length when a model is already in memory.
  • Maps DSH reasoning levels to LM Studio's reasoning_effort values.
  • Parses hidden Qwen reasoning from reasoning_content.
  • Adds a harmless local authorization header required by the OpenAI client library.
  • Excludes embedding models from the DSH model picker.

Commands

dsh-lmstudio doctor
dsh-lmstudio configure [--model ID] [--dry-run]
dsh-lmstudio smoke [--model ID]
dsh-lmstudio install [--model ID]

By default, the generated profile includes every local Qwen model. Add --all-models to include every language model reported by LM Studio.

The default endpoint is http://127.0.0.1:1234/v1. Override it with --base-url or LM_STUDIO_BASE_URL.

Tested setup

The initial live test used:

  • DeepSeek Harness 0.1.0-rc.6
  • LM Studio 0.4.21+2
  • Qwen3.8 27B Q4_K_S
  • Windows 11
  • RTX 5090 with 32 GiB VRAM
  • 32,768-token loaded context

The model produced a valid streamed tool call, accepted the tool result, and returned the expected final answer. The non-streaming baseline took 1.43 seconds for the tool request and 0.80 seconds for the result turn on that machine.

Notes

Keep LM Studio bound to localhost unless you enable API authentication. The Bearer lm-studio value in the generated DSH profile is a local placeholder, not a secret.

Start a new DeepSeek Harness session after changing the default model. Existing sessions retain the provider and model recorded in their logs.

License

MIT

About

Configure DeepSeek Harness for LM Studio and verify Qwen tool calling end to end.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages