Vai al contenuto principale
W

dsh-llm-newapi

wenzetan/dsh-llm-newapi

Provider LLM NewAPI (gateway compatibile con OpenAI): registra una rotta `newapi` con rilevamento dei modelli limitato alla chat, compila automaticamente i parametri del modello (finestra di contesto, sforzo di ragionamento) da models.dev e aggiunge una sezione delle impostazioni web per l'URL di base e la chiave API.

Installazione

dsh plugin --profile web add github:wenzetan/dsh-llm-newapi

README

🚧 Archived Notice / 归档通知

English:
This repository is deprecated and will be archived soon.
New installations should use the native Custom Provider feature provided by dsh desktop instead.
Existing users should migrate their provider configurations before the repository is archived.

中文:
本仓库已停止功能开发,并计划近期归档。
新用户请直接使用 dsh desktop 原生 Custom Provider(自定义 Provider) 功能,不再建议安装或使用本项目。
已有用户请在仓库归档前迁移现有 Provider 配置数据。

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 24, 2026.

dsh hostPlugin version linenpm channelStatus
0.1.5-rc.30.1.5-rc.3-v0.3—Published, that line is frozen
0.1.7-rc.10.1.7-rc.1-v0.xlatestCurrent promoted line

On a host line only the last segment increments (-v0.1 → -v0.2 → …), so the promoted line is named as v0.x. Query the exact version each channel currently points at:

npm view dsh-llm-newapi dist-tags --json

Version scheme

The plugin version follows the upstream host: <dsh version>-v<plugin revision>. Only the last segment is this plugin's own revision:

Casedsh versionPlugin version (npm)Git tag / Release
Upstream RC0.1.7-rc.10.1.7-rc.1-v0.1v0.1.7-rc.1-v0.1
Later plugin change on the same host line0.1.7-rc.10.1.7-rc.1-v0.2v0.1.7-rc.1-v0.2
Upstream stable0.1.70.1.7-v0.1v0.1.7-v0.1
Host line changes (revision restarts)0.1.7-rc.20.1.7-rc.2-v0.1v0.1.7-rc.2-v0.1
  • npm forbids a leading v in the version field, so the package reads 0.1.7-rc.1-v0.1 while the Git tag and GitHub Release use v0.1.7-rc.1-v0.1.
  • Channel split: npm latest points at the currently promoted host line (the 0.1.7 line today); next is reserved for other lines or future previews. Promoting or switching a line is a one-line change (LATEST_LINE in CI); a stable 0.1.7 tag (v0.1.7-v0.x) also lands on latest.
  • The older 0.8.x series (dsh 0.1.1-rc.2 / 0.1.2-rc.1 host lines) had its tags removed and is marked deprecated on npm.

Compatibility and upgrades

Plugin 0.1.7-rc.1-v0.x supports the dsh 0.1.7-rc.1 line and rejects the 0.1.5 host with an explicit upgrade message; 0.1.5-rc.3 users run 0.1.5-rc.3-v0.3. Compatibility is keyed to the host line rather than one patch: a later 0.1.7-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. 0.1.7 replaced the settings architecture (plugin configuration now projects from the profile patch with volatile fields), so this is not a pure dependency bump: see the compatibility assessment (Chinese).

Both lines are GitHub Pre-releases (the plugin has no stable release yet). The host and plugin use latest with different meanings, so do not assume they pair — pick a host line from the table and query dist-tags for the exact version.

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.

Current promoted pair (dsh 0.1.7-rc.1, npm latest)

npm install -g @deepseek-ai/dsh@0.1.7-rc.1
npm install -g pnpm
dsh plugin --profile web add --save-exact "dsh-llm-newapi@$(npm view dsh-llm-newapi dist-tags.latest)"

Previous host pair (dsh 0.1.5-rc.3, that line is frozen)

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

Choose one pair. The promoted pair resolves the current version through dist-tags, so no version needs to be copied by hand; the 0.1.5 line is frozen at 0.1.5-rc.3-v0.3. --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.

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. Recent dsh hosts register 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 newapi credential reference; configuration now persists through the profile's Cordis patch (see configuration).

Host 0.1.7 migrates sessions from V3 to V4 (tool results become tool-role messages, message sources are renamed); 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 dsh also applies environment proxy settings through dsh-http-proxy
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.

Plugin correlati