DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Gateway Provider — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-gateway-provider

Gateway Provider

适用于 DeepSeek Harness 的通用 LLM 网关模型提供商插件:将 newapi / LiteLLM / Higress / 任意 OpenAI-compatible 网关挂载为提供商路由,自动发现模型列表,使用 models.dev 参数丰富每个模型,并分发每个模型

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-gateway-provider@1.0.12
README兼容性版本

兼容性与来源证明

Gateway Provider 以 dsh-gateway-provider 发布,当前版本为 1.0.12。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/9/20

版本

1.0.12stable
2026/9/11
1.0.11stable
2026/9/10
1.0.10stable
2026/9/10
查看其余 8 个版本收起版本
1.0.9stable
2026/9/10
1.0.8stable
2026/9/2
1.0.7stable
2026/9/2
1.0.6stable
2026/9/2
1.0.5stable
2026/8/29
1.0.4stable
2026/8/18
1.0.3stable
2026/8/18
1.0.2stable
2026/8/15

相关插件

正在加载相关插件…

最新版
1.0.12
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
179.9 kB
文件数
14
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 4
周下载
201
安全扫描
✓ v1.0.12 扫描通过
最近提交
2026/9/11
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Usage@linxin666/dsh-usagedsh Web GUI 的使用统计插件:检测各提供商余额和编码计划配额,并提供实时令牌使用记录,以及当前提供商的专属宠物气泡Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。

README

dsh-gateway-provider

中文文档:docs/README.zh.md

Use all the models behind your LLM gateway — newapi, LiteLLM, Higress, or any OpenAI-compatible endpoint — directly in DeepSeek Harness.

Install the plugin, paste your API key, and every gateway model shows up in dsh's model picker with its real parameters (context window, output cap, reasoning support) fetched from models.dev. Requests go out over each model's own native protocol — OpenAI, Anthropic, or Gemini — so tool calls and streaming behave the way that model's maker intended.

Why this exists

dsh ships one adapter per official provider. If your models live behind a gateway, the manual alternative is a hand-maintained static model list with guessed context windows and output caps. This plugin mounts the gateway itself instead:

  • Nothing to maintain by hand — the model list is read from the gateway (GET /v1/models, with a management-API fallback for newapi); add a model on the gateway side and it appears in dsh, no re-deploy.
  • Real numbers, not guesses — models.dev data fills context window, output cap, reasoning levels, release date; config defaults only fill gaps.
  • Every wire format, one plugin — each model routes over its own protocol (OpenAI chat completions / OpenAI responses / Anthropic messages / Gemini), handled by the same pi-ai SDK the official dsh adapter uses.
  • Multiple gateways at once — a default newapi route plus one gateway:<id> route per extra gateway, each with its own cache and key.
  • A settings page instead of YAML — Settings → Gateway Models: add gateways from templates (NewAPI / LiteLLM / Higress / OpenAI-compatible / fully custom), test connections, sync models, hide or override any model, add custom models.

Requirements

  • DeepSeek Harness (dsh) with a web profile (the settings page is a web-UI extension; the provider itself works in any profile).
  • A gateway API key (e.g. a newapi token).

Install

# 1. Install the plugin (dsh plugin add runs pnpm add under the hood)
dsh plugin --profile web add dsh-gateway-provider

# 2. Store your key — pick ONE of:
#    a) the dsh credentials file (recommended; created with mode 0600, hot-reloaded)
echo "NEWAPI_API_KEY: sk-REPLACE_WITH_YOUR_KEY" >> ~/.dsh/.credentials.yaml
#    b) or export it in the shell you launch dsh from:
#       export NEWAPI_API_KEY=sk-REPLACE_WITH_YOUR_KEY

# 3. Restart and open the settings page
dsh --profile web
# → Settings → Gateway Models

Expected result: the model picker gains a "NewAPI" route listing your gateway's chat models, newest first. Click Test on the gateway card — it should answer ✓ Connected — N models. Not using the public newapi cloud? Set Base URL on the card (or baseURL in config) to your own gateway address first.

Daily use

Everything lives in Settings → Gateway Models:

  • Add more gateways — "Add Gateway", pick a template (LiteLLM, Higress, OpenAI-compatible, or fully custom with per-protocol URLs), point it at the base URL, name its key env var, Test, Sync. Each gateway becomes its own route in the picker.
  • Tame the model list — non-chat models (image / speech / embedding / rerank …) are excluded by default regexes; hide or rename any model; add a custom model by hand if the gateway hides it; per-model protocol, context window, output cap, and reasoning levels are all editable.
  • Keys live in dsh's credential store — the settings page shows a badge (✓ Key set · NEWAPI_API_KEY / ⚠ No key set) and can write the key there for you.

Configuration reference

Optional — everything below has a working default. Config lives in the llm-newapi: section of ~/.dsh/settings.yaml (the settings page edits the same keys). The frequently used ones:

KeyDefaultMeaning
baseURLhttps://api.newapi.aiYour gateway's base URL. Env fallbacks: NEWAPI_BASE_URL, NEWAPI_API_URL.
apiKeyEnvNEWAPI_API_KEYWhich env/credential variable holds the key.
labelNewAPIRoute label shown in the picker.
flavornewapiTemplate label only (newapi / litellm / higress / openai-compatible / custom).
gateways—Array of extra gateways: { id, baseURL, apiKeyEnv, label, … }, each becoming a gateway:<id> route.
models—Per-model overrides: { id, name, disabled, protocol, contextWindow, maxTokens, reasoningLevels }.
useModelsDev / modelsUrltrue / models.devParameter enrichment source (supports file: URLs for offline).
excludePatternsimage/speech/…Regex list of model ids to keep out of the picker (matched case-insensitively).
sortModelsByReleasetrueNewest models first.
catalogModeautov1 (/v1/models only) / management (newapi user API) / auto.
endpointPriorityresponses → anthropic → openai → geminiWhich protocol to prefer when a model supports several.
openaiURL / responsesURL / anthropicURL—Fully-custom gateways only: per-protocol endpoint URLs; unset = that protocol off.
maxTokens / defaultContextWindow32768 / 128000

Troubleshooting

SymptomCause → fix
Picker route exists but zero modelsThe plugin can't read your model list. Check the gateway base URL; try catalogMode: "management" for newapi gateways that restrict /v1/models.
401 / auth errors on every requestKey missing or wrong: check the badge in Settings → Gateway Models, or NEWAPI_API_KEY in ~/.dsh/.credentials.yaml.
A model's context window looks wrongmodels.dev had no match. Edit the model on the settings page (or a models: override).
Wrong format answers / tool calls flaky for one modelThat model is routed over a protocol it handles poorly. Pin protocol on the model (openai, openai-response, anthropic, gemini).
Custom gateway with separate endpointsUse flavor: "custom" and set openaiURL / responsesURL / anthropicURL explicitly.

How it works (one minute version)

At startup the plugin registers one provider route per gateway, pulls the model list from the gateway, and fuzzy-matches each model id against models.dev to fill in real parameters. When you pick a model, dsh's request is translated to the pi-ai SDK's format and sent over that model's native protocol; the streamed reply is translated back into dsh chunks. Catalogs are cached (30 min by default) per gateway. No hand-written protocol code — the bridge is lifted from the official dsh-llm-pi-ai adapter.

Development

git clone https://github.com/Luck9Star/dsh-gateway-provider
cd dsh-gateway-provider
pnpm install               # pi-ai (pinned) + @deepseek-ai/* profile symlinks, via the prepare hook
pnpm run test:client       # settings-UI render, both locales
pnpm run test:urls         # URL/derivation units
pnpm run smoke             # live gateway round-trip (needs a real key)

Why the plugin pins its own pi-ai

@earendil-works/pi-ai is a direct dependency (exact-pinned), independent of the pi-ai version bundled with the harness. This decouples the gateway model catalog (thinking levels, per-provider compat such as zhipu GLM's supportsDeveloperRole: false) from harness upgrades: a model missing from the harness's older catalog no longer degrades request encoding. The plugin↔harness boundary passes plain data (GenerateOptions in, dsh StreamChunks out; lib/pi-bridge.js never leaks pi-ai objects across), so the plugin's pi-ai copy and the harness's own coexist safely in one process.

Developing from a checkout: point the profile's package.json at "dsh-gateway-provider": "link:/abs/path" and re-run pnpm install in the profile. Do not also add an id: llm-newapi row to the profile's own cordis.patch.yml — the bundle patch already provides it (duplicate row = loader error).

References & credits

  • pi-ai SDK — all four wire protocols; the bridge reuses the official dsh-llm-pi-ai adapter's translation layer.
  • models.dev — the parameter catalog (context windows, output caps, reasoning, release dates).
  • new-api, LiteLLM, Higress — the gateways this plugin is tested against (any OpenAI-compatible endpoint works).

Security

Keys live in dsh's credential store or the launching environment — never in settings YAML. The repo runs gitleaks in CI and pre-commit to keep secrets out.

License

MIT

Fallbacks when models.dev has no data.
streamIdleTimeoutMs600000Idle timeout while streaming.
headers—Extra HTTP headers sent to the gateway.