deepseek-ai/deepseek-harness · error · ValueError
unsupported DeepSeek Harness runtime mode {selected!r}: expe
Error message
unsupported DeepSeek Harness runtime mode {selected!r}: expected 'exe' or 'node' (explicit argument or $DSH_RUNTIME_MODE) What it means
Error "unsupported DeepSeek Harness runtime mode {selected!r}: expected 'exe' or 'node' (explicit argument or $DSH_RUNTIME_MODE)" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at python/sdk-runtime/src/deepseek_harness_runtime/__init__.py:120
def resolve_bundled_launch_args(mode: str | None = None) -> tuple[str, ...]:
"""The argv tuple that launches the bundled runtime.
Mode selection: the explicit ``mode`` argument wins, then the
``DSH_RUNTIME_MODE`` environment variable (``exe`` | ``node``), then
automatic resolution. Automatic resolution finds the production exe ONLY —
the dev-only node carrier must be selected explicitly so a production
deployment can never silently ride on a source build. Returns
``(exe_path,)`` in exe mode and ``(node_path, bin_js_path)`` in node mode;
raises FileNotFoundError when the selected carrier is unavailable and
ValueError for an unknown mode value.
"""
selected = mode if mode is not None else os.environ.get(RUNTIME_MODE_ENV_VAR)
if selected is None or selected == "exe":
return (str(bundled_runtime_path()),)
if selected == "node":
return _node_launch_args()
raise ValueError(
f"unsupported DeepSeek Harness runtime mode {selected!r}: expected 'exe' or 'node' "
f"(explicit argument or ${RUNTIME_MODE_ENV_VAR})"
)
def _current_platform_tag() -> str:
plat = _PLATFORM_TAGS.get(sys.platform)
arch = _ARCH_TAGS.get(platform.machine().lower())
if plat is None or arch is None:
raise FileNotFoundError(
"no bundled dsh-jsonrpc-agent executable exists for this platform "
f"(sys.platform={sys.platform!r}, machine={platform.machine()!r}); supported: "
"linux/macos on x64/arm64. " + _EXE_ACQUISITION_HINT
)
return f"{plat}-{arch}"
def _node_launch_args() -> tuple[str, str]:View on GitHub (pinned to b150a551b8)
Solutions
- Select runtime mode 'exe' or 'node' via the explicit argument or DSH_RUNTIME_MODE.
When it happens
Trigger: Thrown at python/sdk-runtime/src/deepseek_harness_runtime/__init__.py:120 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/e3e39be940894edc.
Report an issue: GitHub.