Preface¶
If you’re using DeepSeek Harness (dsh) with the web profile and want to connect OpenAI-compatible gateways like NewAPI without modifying dsh itself, this plugin is worth a look.
DSH follows the philosophy of “everything is a plugin”; the community directory is an independent site with no official affiliation to DeepSeek / High-Flyer. dsh-llm-newapi is an LLM Provider plugin that adds a NewAPI provider to dsh, with provider route id newapi and display name NewAPI. The README describes it as “zero modifications to dsh itself”.
What This Is¶
- Repository path:
wenzetan/dsh-llm-newapi - License:
MIT - Plugin category: LLM Provider
- Purpose: Adds a NewAPI provider to dsh without modifying dsh itself
- Interface: Implements the
LlmAdapterseam from@deepseek-ai/dsh-llmfor OpenAI-compatible gateways - Endpoints:
POST {baseURL}/chat/completionsGET {baseURL}/modelsbaseURLmust include/v1- Structure: host-side adapter, chat-only model discovery, and a
NewAPIsettings page in dsh web - Installation channels: npm registry, versioned GitHub tags, release tarball, local link development
- API key: Configured via the web settings page, fixed credentials reference name is
newapi, not read from environment variables
Core Features¶
-
Adds a NewAPI provider
The plugin registers provider route idnewapiin dsh with display nameNewAPI. -
Connects OpenAI-compatible gateways
It implements theLlmAdapterseam, usingPOST {baseURL}/chat/completionsandGET {baseURL}/models. ThebaseURLmust include/v1. -
Two-sided architecture
The host side provides the LLM adapter and chat-only model discovery; the browser side provides aNewAPIpage in the dsh web settings panel. -
Model discovery
Fetches the model list viaGET {baseURL}/modelsand only adopts models that can servechat-completions. Models with types likeembedding,rerank, andrankerare filtered out based on naming conventions, unless adjusted via configuration. -
Web settings page configuration
After installation, open theNewAPIsettings page in dsh web, enter the API key and gateway address, useFetch model infoto pull the model list, select chat models, and save. -
Configurable options
The configuration can define:
-baseURL
-models
-modelExcludePatterns
-defaultContextWindow
-maxTokens
-providerHints -
Write validation
When writing settings, configuration validation rejects non-http(s)baseURLvalues and empty filter entries. -
API key behavior
The API key is not read from environment variables. Without a key, the first request will fail with the errorMISSING_CREDENTIAL, which points to the settings page.
Installation and Activation¶
The README requires dsh version to be at least:
dsh ≥ 0.1.0-rc
The dsh web profile is used as an example below.
Installing the Stable Version¶
Use the npm registry:
dsh plugin --profile web add dsh-llm-newapi
Then edit:
$DSH_HOME/profiles/web/package.json
Add the following to the dsh.profile.bundles array:
"dsh-llm-newapi"
Finally, restart dsh web.
Installing from a Stable GitHub Tag¶
Use a moving GitHub tag:
dsh plugin --profile web add "github:wenzetan/dsh-llm-newapi#latest"
After installation, you still need to add dsh-llm-newapi to dsh.profile.bundles and restart dsh web.
Installing a Prerelease Version¶
Use the npm next channel:
dsh plugin --profile web add dsh-llm-newapi@next
After installation, register the bundle and restart dsh web as well.
The README also supports release tarball or local link development, but the bundle registration and restart steps after installation are the same.
Possible Missing-Peer Warnings During Installation¶
Seeing missing-peer warnings during installation is expected. Runtime peers such as react, cordis, dsh-llm, dsh-settings, and schemastery are provided at runtime by the dsh host app.
Do not manually install these peers, and do not enable autoInstallPeers. Doing so may lead to duplicate cordis services and cause plugin failures.
Do Not Use Untagged GitHub Shorthand¶
The untagged form github:wenzetan/dsh-llm-newapi installs the main HEAD. The README marks it as not recommended for release use.
Typical Usage¶
After installation and bundle registration, open the NewAPI settings page in dsh web:
- Enter the API key.
- Enter the gateway address, which must include
/v1. - Click
Fetch model infoto pull the model list fromGET {baseURL}/models. - Select the chat models you want to use.
- Save.
After saving, the models under the newapi provider can be used in dsh web as models for that provider.
Below is a configuration example; adjust it based on your gateway address and model catalog:
- id: llm-newapi
name: dsh-llm-newapi
config:
baseURL: http://gateway.local:3000/v1
# models: []
# modelExcludePatterns:
# - embed
# - rerank
# - ranker
# defaultContextWindow: 128000
# maxTokens: 8192
# providerHints: {}
Where:
baseURLmust include/v1.modelsis the suggested catalog.modelExcludePatternsis used for filtering during chat-only model discovery.defaultContextWindowis used for the context window when there is no corresponding model entry in the catalog.maxTokensis used for model invocation parameters.providerHintsis used for provider hints configuration.
The API key is not entered in the configuration. It lives under the fixed credentials reference newapi, and the only configuration entry point is the web settings page.
Applicable Scenarios and Notes¶
Suitable for the following cases:
- Using the dsh web profile.
- Needing to connect to NewAPI or compatible OpenAI-compatible gateway model services.
- Wanting to add a provider route through the dsh plugin mechanism rather than modifying dsh itself.
- Preferring to manage the API key through the web settings page instead of environment variables.
Notes before use:
- The dsh version must meet the README requirement:
dsh ≥ 0.1.0-rc. - After installation, you need to add the plugin to
dsh.profile.bundlesin$DSH_HOME/profiles/web/package.jsonand restart dsh web. - Missing-peer warnings are expected; do not manually install peers or enable
autoInstallPeers. - The untagged
github:wenzetan/dsh-llm-newapiinstalls themainHEAD and is not recommended for release use. - The API key is not read from environment variables; without a key, the first request returns
MISSING_CREDENTIAL. - Model discovery only adopts models that can serve
chat-completions; models of types likeembedding,rerank, andrankerare filtered by naming conventions by default. - It will be loaded and run as a bundle of the dsh web profile; review the source code and
MITlicense before installation.
Links¶
- Community directory page: https://www.skillhub.cn/plugins/wenzetan/dsh-llm-newapi
- GitHub: https://github.com/wenzetan/dsh-llm-newapi