DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

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

dsh-llamacpp

Llamacpp

通过 OpenAI 兼容的 /v1/chat/completions API 连接本地 llama.cpp 服务器的 DeepSeek Harness LLM 适配器插件

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

npx -y @deepseek-ai/dsh plugin --profile web add github:jwilson411/dsh-llamacpp#38b08744b6666ba8d57c21b80c3abd37219a0ce4
README兼容性版本

说明

通过 OpenAI 兼容的 /v1/chat/completions API 连接本地 llama.cpp 服务器的 DeepSeek Harness LLM 适配器插件。

兼容性与来源证明

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

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/8/29

版本

0.1.0stable
2026/8/29

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/9/1
查看源码 ↗
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-llamacpp

A DeepSeek Harness LLM adapter plugin for a local llama.cpp server, spoken over its OpenAI-compatible /v1/chat/completions API.

This is llama.cpp, not Ollama. It talks to llama-server directly — the binary you build or download from llama.cpp — and knows nothing about Ollama's model registry, its /api/* routes, or its automatic model pulls. If you run Ollama, this is the wrong plugin.

It is also not a tool. It registers nothing on ctx.tools; it registers a provider on the official LLM seam:

ctx.llm.registerAdapter(['llamacpp'], adapter)

Once registered, llamacpp is a provider route like any other, and the harness routes model calls to it through ctx.llm.stream().

Install

dsh plugin --profile web add github:jwilson411/dsh-llamacpp

The package ships dsh.bundle.patch pointing at cordis.patch.yml, so adding it inserts a configured llamacpp plugin row into the profile.

Pinned harness RC

Built against 0.1.1-rc.2 of the @deepseek-ai/dsh-* packages — the same RC as jwilson411/dsh-plugin-kit and jwilson411/dsh-spend-receipt. Note that @deepseek-ai/dsh-llm's latest dist-tag still points at 0.0.1-rc.1; the RC line lives under the next tag, which is why the dev dependencies pin exact versions rather than tracking latest.

The seams used are LlmAdapter, LlmError, attributionHeaders, and errorChain from @deepseek-ai/dsh-llm. If one of those names moves in a later RC, this package stays pinned to 0.1.1-rc.2 until it is updated deliberately.

Running llama.cpp

Start llama-server with the weights you already have. The flags that matter to this plugin:

FlagWhy it matters here
--port 8080The port in the default baseURL (http://127.0.0.1:8080/v1).
--alias qwenThe model name the server accepts and this plugin sends. Set it to match model, or set model to match it.
--api-keyIf set, every request must carry Authorization: Bearer …. Configure apiKey (or DSH_LLAMACPP_API_KEY) to the same value.
-c / --ctx-sizeThe context window. Requests that exceed it fail at the server; this plugin surfaces that failure rather than truncating.

Example:

llama-server -m qwen.gguf --port 8080 --alias qwen -c 32768 --api-key $DSH_LLAMACPP_API_KEY

Offload flags (-ngl, tensor split, and friends) are between you and your hardware — they change nothing about the wire protocol, so this plugin has no opinion about them.

Configuration

KeyEnv fallbackDefault
baseURLDSH_LLAMACPP_BASE_URLhttp://127.0.0.1:8080/v1
modelDSH_LLAMACPP_MODELqwen
apiKeyDSH_LLAMACPP_API_KEY(unset — no Authorization header is sent)
provider—['llamacpp']

The patch row wins over the environment; the environment fills in whatever the row leaves out. An exported-but-empty variable counts as unset.

baseURL already includes /v1, and requests go to ${baseURL}/chat/completions — the /v1 is never doubled. If your server sits behind a proxy that strips the prefix, set baseURL to the base the proxy actually serves.

Cordis overlay

To point the plugin at a different server, model, or credential, target the llamacpp id in your profile overlay. An id-targeted patch replaces the whole config object, so repeat every field you want, not just the one you are changing:

- id: llamacpp
  config:
    baseURL: http://127.0.0.1:9090/v1
    model: qwen3-coder
    apiKey: change-me

What it sends

Per model call, one POST ${baseURL}/chat/completions with stream: true. Every request merges attributionHeaders() from @deepseek-ai/dsh-llm (a User-Agent identifying the harness — a public product fact, no secrets) and forwards options.signal, so an aborted turn aborts the HTTP request.

Request mapping:

  • options.system is prepended as a system message.
  • options.messages become OpenAI { role, content } messages; text blocks are concatenated.
  • options.tools become the OpenAI tools array.
  • options.temperature, options.stop pass through.
  • options.maxTokens maps to max_tokens — llama.cpp's server does not read max_completion_tokens.
  • options.model is used when the request carries one, otherwise the configured model.

What it yields

The harness StreamChunk protocol, in order:

  1. block-start, index 0, blockType text
  2. one text-delta per choices[0].delta.content string
  3. block-end carrying the full assembled { type: 'text', text }
  4. usage, when the server reported any (prompt_tokens → inputTokens, completion_tokens → outputTokens; llama.cpp has no cache split, so no cache fields are invented)
  5. finish, last

A response that produced no text opens no block, so every block-start still has its block-end.

finish_reason maps to { kind: 'stop' }, { kind: 'tool-calls' } for tool_calls, and { kind: 'max-tokens' } for length — a truncated answer is not reported as a complete one.

Some builds and proxies ignore stream: true and answer with a single JSON chat.completion. That is translated into exactly the same chunk sequence.

Failures are loud

Nothing is swallowed into an empty stream. Every failure is an LlmError with a stable code:

CodeWhen
PROVIDER_UNREACHABLEConnection refused, DNS failure, reset mid-stream — usually llama-server is not running.
PROVIDER_HTTP_ERRORNon-2xx answer; carries the HTTP status and quotes the body.
PROVIDER_ERRORThe server reported its own failure in-band, as an error payload.
PROVIDER_PROTOCOL_ERRORA stream frame that is not JSON.
UNSUPPORTED_CONTENTA message carried an image, tool-call, or tool-result block.

A caller-driven abort is re-thrown unchanged, so the runtime reports it as an aborted finish rather than a dead server.

Text only

This is a thin adapter. It sends text and streams text back. Image blocks are refused, not quietly dropped, because dropping one hands the model a conversation the caller never wrote; the same holds for tool-call and tool-result blocks, so a full tool round-trip is out of scope here even though options.tools is forwarded and a tool_calls finish is reported.

Development

npm install
npm test

The tests mock an OpenAI-compatible server with Node's http and node:test. No GPU, no weight download, no real llama.cpp process, and no network beyond loopback.

License

MIT © 2026 jwilson411