Introduction
This hands-on guide documents a complete Windows deployment workflow for DeepSeek Harness (DSH), covering environment preparation, plugin configuration, and custom large-model gateway integration. It records 7 common failure cases encountered during installation and configuration, along with root cause analysis, step-by-step fixes, and universal troubleshooting frameworks. Readers can use this material to avoid typical pitfalls when setting up DSH and connecting self-hosted or third-party model endpoints.
The content is built from real-world debugging logs. All command samples, error messages and configuration snippets are validated on Windows environments. This article is intended for AI developers and agent engineers who want to run DeepSeek Harness locally and route model requests through custom API gateways.
1. Environment Preparation Stage
This phase covers Node.js runtime setup with nvm, and global installation of the DSH command-line tool. Two frequent setup bugs are outlined below.
Pitfall 1: Node Version Check and nvm Usage
Observed Symptom: Running nvm use 22.19.0 returns the error activation error: Version not installed.
Root Cause: The nvm utility only switches to Node versions already downloaded locally. It will not automatically fetch and install missing releases.
Correct Workflow:
nvm ls
nvm install 22.19.0
nvm use 22.19.0
DSH requires Node.js version 22.19.0+ or 24.0.0+. If the machine already runs a newer compatible release such as 22.22.0, no downgrade is necessary.
Pitfall 2: dsh Command Not Recognized
Observed Symptom: The terminal reports 'dsh' is not recognized as an internal or external command.
Root Cause: The developer only executed the tool temporarily with npx @deepseek-ai/dsh web, without performing a global npm install. The executable path was never added to the system PATH variable.
Correct Workflow:
npm install -g @deepseek-ai/dsh
After installation, close and reopen your terminal window to refresh the PATH environment variable. Verify the installation:
dsh --version
For slow network connections, specify a registry mirror:
npm install -g @deepseek-ai/dsh --registry=https://registry.npmmirror.com
2. Plugin Installation Stage
Plugin loading is a common source of DSH runtime failures. Three major issues related to deprecated packages, pnpm script blocking, and module fallback conflicts are detailed here.
Pitfall 3: Deprecated Package Causes Duplicate Loader Entry
Observed Symptom: On dsh web startup, the log outputs:
duplicate loader entry id: web-ui-compat
Root Cause: package.json contains both the old deprecated package @linxin666/dsh-web-ui-all and the new replacement @linxin666/dsh-web-all. Both packages include compat bridge code, registering the same loader entry twice.
Diagnosis:
Inspect the profile package file:
type C:\Users\Lenovo\.dsh\profiles\web\package.json
Check both the dependencies section and dsh.profile.bundles array for duplicate entries.
Resolution:
dsh plugin --profile web remove @linxin666/dsh-web-ui-all
If the error persists after removal, open cordis.patch.yml and manually delete leftover web-ui-compat insert statements.
Key Lesson: dsh-web-ui-all is fully deprecated. Use @linxin666/dsh-web-all@latest exclusively.
Pitfall 4: pnpm Blocks Native Build Scripts
Observed Symptom: During plugin installation, pnpm outputs warnings:
[ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: cloudflared, cpu-features, node-pty, ssh2
Root Cause: Starting from pnpm 10, package build scripts are blocked by default as a security measure against malicious packages. DSH terminal capabilities depend on these native modules; skipping compilation will trigger runtime crashes.
Interactive Resolution:
dsh plugin --profile web approve-builds
Approve each dependency one by one when prompted.
Non-interactive Resolution:
Edit C:\Users\Lenovo\.dsh\profiles\web\pnpm-workspace.yaml and add explicit build allowlist entries:
allowedBuilds:
cloudflared@">=0.7.3": true
cpu-features@">=0.10": true
node-pty@">=1": true
ssh2@">=1.17.0": true
Pitfall 5: Module Fallback Real Directory Conflict
Observed Symptom: Module fallback error:
dsh: ...dsh-module-fallback\node_modules\dage-d3-es exists and is not a symlink or dsh-managed module proxy
Root Cause: The healProfileModuleFallback mechanism requires files inside the fallback directory to be symbolic links. On Windows, file extraction utilities often create physical copies instead of symlinks, breaking the module proxy logic.
Resolution: Delete the non-compliant directory or rebuild the fallback cache entirely.
rmdir /s /q "C:\Users\Lenovo\.dsh\profiles\web\.dsh-module-fallback"
The fallback folder is only runtime cache. Deleting it will not remove the core plugin packages stored inside package.json or the pnpm store.
Validate Profile Configuration:
dsh --profile web --dump-config
Note:
--dump-configprints static configuration only. It does not executecomposeProfileorhealworkflows, so it cannot fully verify whetherdsh webwill launch successfully.
3. Custom LLM API Gateway Integration
This section covers configuration errors when routing DSH requests to a self-managed or third-party model gateway. Two common API gateway integration bugs are explained.
Pitfall 6: Unsupported reasoning_effort Parameter
Observed Symptom:
provider "llm-api-gateway" model "deepseek-v4-flash" does not support reasoning_effort
Root Cause: DSH automatically injects the reasoning_effort parameter into API requests by default. Many custom gateways and non-OpenAI compatible model endpoints do not recognize this argument, triggering validation failures.
Resolution: Remove the reasoning_effort parameter definition inside your provider configuration file.
Pitfall 7: 405 Method Not Allowed – Missing /v1 Suffix in baseURL
Observed Symptom: Gateway logs show a 405 Method Not Allowed error.
Root Cause: DSH appends /chat/completions to the baseURL value. If baseURL is defined as http://192.168.5.34:9000, the final request path becomes http://192.168.5.34:9000/chat/completions. Many OpenAI-compatible gateways expose the endpoint under /v1/chat/completions. The missing /v1 prefix results in a route mismatch and returns HTTP 405.
Fixed YAML Configuration:
llm-pi:
providers:
llm-api-gateway:
apiKeyEnv: LLM_API_GATEWAY_API_KEY
baseURL: "http://192.168.5.34:9000/v1"
api: openai-completions
models:
- id: deepseek-v4-flash
name: deepseek-v4-flash
- id: deepseek-v4-pro
name: deepseek-v4-pro
agent-default-model: deepseek-v4-pro
provider: llm-api-gateway
Fast Validation Method:
Use curl to test both endpoint variants to identify which path returns HTTP 200:
curl -X POST http://192.168.5.34:9000/v1/chat/completions -H "Content-Type:application/json" -d '{"model":"deepseek-v4-flash"}'
Use the working path for your DSH provider configuration.
Clarification on "Context Injection" Log Entries
The following log lines are normal informational output, not error messages:
上下文注入 deepseek-ai/system-prompt
上下文注入 skill-catalog
DSH uses layered prompt injection, combining system prompts, skill catalogs, conversation history and tool outputs. The actual failure root cause will appear after these injection logs.
4. General Troubleshooting Summary
The table below summarizes key operations, common failure points and quick diagnosis methods across each deployment stage.
| Stage | Core Actions | Common Pitfalls | Quick Diagnosis |
|---|---|---|---|
| Environment | Verify Node version with nvm | Attempting nvm use for uninstalled versions |
Run nvm ls to check local versions |
| Installation | Global npm install, restart terminal |
dsh command missing after npx test |
Run npm install -g and refresh PATH |
| Plugins | Manage plugin packages with dsh plugin | Duplicate packages create loader conflicts | Inspect package.json for duplicate dependencies |
| Build | Approve native build scripts with pnpm | pnpm blocks required native module compilation | Add packages to pnpm allowedBuilds |
| Startup | Rebuild module fallback cache | Windows physical directories break symlink proxies | Delete .dsh-module-fallback and re-heal |
| Gateway | Set baseURL correctly | Missing /v1 suffix returns HTTP 405 |
Test raw endpoints with curl |
| Model | Strip unsupported request fields | Gateway rejects parameters like reasoning_effort
|
Remove unsupported parameters from provider config |
Three Core Troubleshooting Principles
-
Read error logs literally. Error text directly points to the root cause. For
duplicate loader entry, locate duplicate packages. Forexists and is not a symlink, remove the invalid directory. For405, validate the full request route path. -
--dump-configcannot prove runtime readiness. It validates static configuration, butcomposeProfileandhealrun only at launch. -
Differentiate OpenAI API variants.
openai-completionsandanthropic-messagesuse different route structures. ThebaseURLmust match the API variant you select.
When managing multiple LLM endpoints and gateway routing rules for agent workflows, developers can simplify authentication, traffic throttling and unified logging. 4sapi, an API gateway, helps consolidate requests across multiple model services.
Conclusion
DeepSeek Harness provides a powerful local agent runtime, but Windows deployments involve several platform-specific and package-management pitfalls. Most failures are not bugs inside DSH itself. They stem from environment PATH issues, deprecated plugin dependencies, pnpm security restrictions, Windows symlink behavior, and incorrect API gateway endpoint configuration.
This guide walks through seven common failure scenarios, each with root cause explanation and actionable remediation steps. Developers should validate the Node.js environment first, clean deprecated plugin packages, approve native build scripts for pnpm, manage module fallback symlinks, and carefully verify gateway baseURL paths and supported request parameters. Following this structured troubleshooting workflow can drastically reduce deployment time when integrating custom model gateways with DeepSeek Harness.
International access: https://4sapi.com
Domestic access: https://4sapi.cn
Top comments (0)