Upgrade DSH Python SDK: wheel and bundled dsh runtime

Update & UpgradePublished 2026-10-21Author: DeepSeek Plugin Market
DeepSeek HarnessPython SDKupgradewheelsdk-minimal
The DSH Python SDK wheel bundles a native dsh runtime. Upgrade the wheel, restart the host, then check sdk-minimal patches and session logs.

Upgrading the DeepSeek Harness Python SDK is not just swapping a Python dependency: the wheel also contains a matched native runtime and the dsh command. The SDK lazily starts a dsh --profile sdk-minimal process and reuses it until the context exits. So the upgrade sequence is install the target wheel, restart the host process, and verify the profile—not just step one.

DeepSeek Harness: Three things move together

One wheel upgrade changes the Python API, the bundled dsh runtime, and the bundled profile templates. What each affects:(source)

ComponentEffect after upgrade
Python packageDeepSeekHarness API and arguments
Bundled runtimedsh command, profile parsing, tools, subsystems
Bundled profilesDefault tree and available tools in sdk-minimal

The official docs note that sdk-minimal does not contain dsh-base; it inserts a complete tree on an empty root. Tools added to the base profile later do not appear implicitly. If a tool disappears after an upgrade, check this boundary before assuming the install failed.

The wheel also packages the full web profile and frontend assets, but dsh web is a separate CLI app and cannot serve a Python SDK client. Keep “SDK bundled runtime” and “separately installed dsh” distinct.

DeepSeek Harness: What to record first

Record versions and a configuration baseline before upgrading, or you will have nothing to compare against. Three items:(source)

  1. Python package version — python -m pip show deepseek-harness-sdk. Expected: note the exact version.
  2. Bundled dsh version — dsh -V inside the same venv. Expected: confirm it comes from this venv, not another global install.
  3. sdk-minimal config — dsh --profile sdk-minimal --dump-config if the profile exists. Expected: save the effective tree for a later diff.

If the profile is not initialized yet, run dsh --profile sdk-minimal --dump-default-config >/dev/null first so the profile files exist.

DeepSeek Harness: Upgrade steps

Install the target version in the same venv, restart the Python host, then verify with a minimal task. Steps:(source)

sh
# 1. Activate the SDK virtualenv
. .venv/bin/activate

# 2. Install a pinned target version
python -m pip install --upgrade "deepseek-harness-sdk==<target>"

# 3. Check the bundled runtime
dsh -V
  1. Pin the version — production should not float to “latest” during a routine upgrade. Expected: pip show reports the target version.
  2. Restart the host process — close every process using DeepSeekHarness, then start again. Expected: the new runtime loads at startup.
  3. Run a minimal task — use minimal.py or a read-only task. Expected: final_response returns normally.
  4. Compare the profile — dump the effective tree and diff against the baseline. Expected: no field was silently removed or rewritten.

Step 2 is the most commonly skipped: a running process keeps the dsh process it started until the context exits, even after the wheel on disk changes.

DeepSeek Harness: Three upgrade strategies

In-place, side-by-side, and version pinning suit different risk levels. Compare:(source)

  1. In-place venv — install the new version into the existing venv. Expected: least disk, but rollback means reinstalling the old version.
  2. Side-by-side venv — create .venv-next, validate, then switch. Expected: rollback is a symlink or shell switch.
  3. Pinned version + mirror — pin the SDK in requirements and install from an internal mirror. Expected: consistent across machines, insulated from upstream releases.

In every strategy, do not delete DSH_HOME; profiles, plugins, and sessions live there.

DeepSeek Harness: Rollback and verification commands

Write down the old version before upgrading so rollback is not a guess. A practical set:(source)

sh
python -m pip show deepseek-harness-sdk | grep ^Version
dsh -V
# Roll back to the recorded version
python -m pip install "deepseek-harness-sdk==<old>"
dsh --profile sdk-minimal --dump-config > /tmp/sdk-config-after.yml
  1. Record the old version — one line from pip show, one from dsh -V. Expected: a clear rollback target.
  2. Reinstall the old version — pin it in the same venv. Expected: no fallback to another profile.
  3. Restart and verify — rerun the minimal task and check final_response. Expected: the Python package and runtime match.
  4. Compare config — dump the profile before and after. Expected: no field silently disappears.

Rollback only swaps the wheel; DSH_HOME stays. Sessions and plugins remain, but an older version may not understand a newer format, so follow the startup prompt if migration is required.

DeepSeek Harness: Common incompatibilities

Most post-upgrade failures are old patches no longer matching the new tree, not a broken install. Four cases:(source)

  1. Patch points at a removed plugin — startup reports an unresolved package. Expected: delete the corresponding insert from cordis.patch.yml.
  2. str_replace_editor patch stops working — the package name or mount method changed. Expected: regenerate editor.patch.yml for the new version.
  3. sdk-minimal loses a tool — it does not contain dsh-base and does not inherit new base tools. Expected: add the tool with a patch if needed.
  4. Session format migration prompt — the new version wants to migrate old JSONL. Expected: follow the prompt instead of deleting logs.

If startup fails outright, read whether the error is “missing server entry”, “unresolved plugin”, or “invalid patch”; none of them fall back to another combination.

DeepSeek Harness FAQ

Do I need to reinstall plugins after upgrading? Not necessarily. Plugins live in DSH_HOME and survive the wheel upgrade. If a plugin is incompatible with the new runtime, update or reinstall it according to its documentation.

Can a global dsh upgrade the SDK runtime? No. The SDK uses the runtime in its own wheel; a global dsh is another installation. The versions can differ, so record both to avoid checking the wrong one.

How do I roll back a failed upgrade? A side-by-side venv switches back directly; an in-place upgrade reinstalls the old wheel and restarts. DSH_HOME stays untouched.

The short version: treat an SDK upgrade as three things—wheel, runtime, profile—and restart the process; skipping the restart means you did not upgrade.

FAQ

Is upgrading the DeepSeek Harness Python SDK just a pip install?

DeepSeek Harness: no. The wheel contains a matched native runtime and the dsh command, so upgrading replaces the Python package and the bundled runtime together. Restart the Python host afterward; the SDK lazily starts a dsh process and reuses it until the context exits.

Does the SDK need system Node.js?

DeepSeek Harness: normal SDK runs do not. The wheel bundles a matched native runtime. Only some plugin management commands, such as dsh plugin add, need pnpm; starting an installed SDK does not.

Will upgrading erase my sdk-minimal configuration?

DeepSeek Harness: no. Configuration lives in $DSH_HOME/profiles/sdk-minimal/cordis.patch.yml and the home patch, and upgrading the wheel does not delete the home. New versions can still change fields or the plugin tree, so dump the profile and compare after upgrading.

Does upgrading the Python SDK change a separately installed dsh web?

DeepSeek Harness: they are separate installations. The SDK wheel also packages the web profile and frontend assets, but dsh web is a separate CLI app. If you also installed dsh globally, check both versions to avoid drift.

Are DeepSeek Harness Python SDK session logs preserved after upgrading?

DeepSeek Harness: yes. SDK sessions are uncompressed JSONL under the explicit dsh_home/sessions directory. Upgrading does not delete them. If the new version requires a format migration, follow the startup prompt instead of deleting the logs.

Related Terms

deepseek-harness-sdk
deepseek-harness-sdk is the official DeepSeek Harness Python package. It installs a matched native runtime wheel and the dsh command, and exposes the DeepSeekHarness class for driving a dsh profile.— DeepSeek Harness docs - Python SDK
bundled runtime
The bundled runtime is the native dsh runtime shipped inside deepseek-harness-sdk. Normal SDK runs do not need system Node.js, and the runtime version moves with the Python package.— DeepSeek Harness docs - Python SDK
sdk-minimal
sdk-minimal is the minimal SDK profile. It builds a complete tree on an empty root without dsh-base and contains only the SDK protocol, DeepSeek adapter, local execution, and persistence.— DeepSeek Harness docs - Python SDK
dsh_home
dsh_home is the isolated SDK home holding profiles, installed plugins, credentials, settings, and session logs. The SDK only uses the home you pass explicitly and does not read ~/.dsh.— DeepSeek Harness docs - Python SDK

Sources