← Back to home@wenzetan

dsh-llm-newapi

NewAPI (OpenAI-compatible gateway) LLM provider plugin for DeepSeek Harness (dsh): chat-only model discovery + Web settings section. Zero dsh modifications.

Stars
6
Language
TypeScript
Created
Aug 14, 2026
Updated
Sep 16, 2026

Introduction

dsh-llm-newapi

English | 中文

Use your NewAPI gateway in DeepSeek Harness (dsh). The plugin adds a NewAPI settings page for credentials, model discovery and model parameters, plus streaming text and tool calls. It requires no changes to dsh.

Choose a compatible version

Install the host and plugin as a pair. Status checked on September 11, 2026.

dsh hostPluginStatus
0.1.1-rc.20.8.4Published; plugin npm latest
0.1.2-rc.10.8.6-rc.1Published; the last release for that host line
0.1.5-rc0.8.6-rc.2Published; superseded by 0.8.6-rc.3
0.1.5-rc0.8.6-rc.3Current release; npm next, GitHub Pre-release. Adds the select-all box to the fetched-model picker

Plugin 0.8.6-rc.3 supports the dsh 0.1.5-rc line and rejects the older 0.1.2-rc.1 host with an explicit upgrade message; 0.1.2-rc.1 users stay on plugin 0.8.6-rc.1. Compatibility is keyed to the host line rather than one patch: within 0.1.5-rc the seam surface is fixed, so 0.1.5-rc.1 and 0.1.5-rc.2 ship identical lib/** code and the plugin builds byte-identical output against either. A later 0.1.5-rc cut is covered as long as its export surface matches — npm run test:host compares the installed surface against the checked-in one and fails loudly when it does not, instead of assuming. See the compatibility assessment (Chinese).

Releases stay on the pre-release channel: npm next and a GitHub Pre-release. Nothing here promotes a stable version or moves the plugin's latest tag, which stays on 0.8.4. The host and plugin have separate release channels; their respective latest versions are not necessarily compatible.

Install exact versions

You need Node.js, npm and pnpm. Repository CI uses Node.js 24. Install the host with npm, then install the plugin from the npm registry into dsh's web profile.

Published RC pair (dsh 0.1.2-rc.1)

npm install -g @deepseek-ai/dsh@0.1.2-rc.1
npm install -g pnpm
dsh plugin --profile web add --save-exact dsh-llm-newapi@0.8.6-rc.1

Pair for the older host

npm install -g @deepseek-ai/dsh@0.1.1-rc.2
npm install -g pnpm
dsh plugin --profile web add --save-exact dsh-llm-newapi@0.8.4

Choose one pair. --save-exact records an exact plugin dependency so a later dependency update does not switch versions automatically. Use dsh plugin to manage the profile; installing dsh-llm-newapi globally by itself does not register it there.

Current host pair (dsh 0.1.5-rc)

npm view dsh-llm-newapi@0.8.6-rc.3 version
npm install -g @deepseek-ai/dsh@0.1.5-rc.2
npm install -g pnpm
dsh plugin --profile web add --save-exact dsh-llm-newapi@0.8.6-rc.3

Check that the plugin is enabled

Open $DSH_HOME/profiles/web/package.json. With no DSH_HOME override, this is .dsh/profiles/web/package.json under your home directory.

Ensure dsh.profile.bundles contains dsh-llm-newapi. Host 0.1.5 registers installed bundle plugins automatically. On an older host or an existing profile where the entry is missing, append it once and preserve the other entries. This is a JSON fragment to check, not a replacement for the entire file:

{
  "dsh": {
    "profile": {
      "bundles": [
        "@deepseek-ai/dsh-base",
        "@deepseek-ai/dsh-web-app",
        "dsh-llm-newapi"
      ]
    }
  }
}

Check the installed versions, then restart dsh Web:

dsh --version
dsh plugin --profile web list dsh-llm-newapi
dsh web

First use

  1. Open NewAPI in dsh Web settings.
  2. Enter your gateway URL, such as https://your-gateway.example/v1, and API key. Include /v1; do not enter the full /chat/completions path.
  3. Click Fetch models, select the models you need and add the selected entries.
  4. Optionally fetch model information from models.dev. Review context limits, output limits and reasoning efforts before applying values.
  5. Click Save, then choose a model under the newapi provider in the conversation model picker.

Model discovery queries your gateway for available models. models.dev is a public parameter catalog; a match does not establish that your gateway supports a model or feature. Save after applying catalog values.

Capabilities and limits

FeatureBehavior
Text, reasoning content and tool callsStreaming supported; an explicit reasoning effort is sent as reasoning_effort
Image inputThe adapter currently declares text-only input
Model discoveryQueries /models and filters names containing embed, rerank or ranker; this is not a capability probe
Model parametersEdit manually or match against models.dev; verify against your gateway
API keySaved through settings, never echoed; a blank input preserves the stored key
Multiple gatewaysOne newapi route and one gateway configuration are currently supported

Upgrading and troubleshooting

Check the version table, stop dsh Web and back up your dsh configuration and session data before upgrading. Install the target host and exact plugin version, keep the existing bundle entry and restart. The plugin retains the llm-newapi settings namespace and newapi credential reference.

Host 0.1.5 migrates session data; older hosts cannot directly read migrated sessions. Reinstalling an older npm version alone is not a complete rollback. See the upstream migration guide.

SymptomCheck first
No NewAPI settings pageThe web profile, bundle entry, host compatibility and whether Web was restarted
Missing credentialEnter and save the key in NewAPI settings; the plugin does not read NEWAPI_API_KEY
Discovery failsThe /v1 base URL, API key and gateway support for /models
Empty model listName-based filtering; manually add a model only if it supports chat-completions
models.dev download failsNetwork and proxy settings; the plugin proxy applies to this download, while host 0.1.5 also applies environment proxy settings
Missing-peer warnings during installdsh supplies host packages. If installation and startup succeed, do not install duplicate host packages just to silence these warnings; investigate actual startup errors separately

Documentation

The detailed guides below are currently in Chinese:

See GitHub Releases for published changes and downloadable packages.