dsh-models-import
DeepSeek Harness 插件:从 OpenAI 兼容 /v1/models 列表导入带能力标注的模型(网关能力扩展),并在设置页编辑各模型的 thinking、vision 等能力
dudo-m
@dudo-m
⬇ 2
★ 2
master
安装
dsh plugin --profile web add github:dudo-m/dsh-models-import
需要可复现安装时,可在仓库后追加 #commit 固定提交。
DeepSeek Harness 插件:从 OpenAI 兼容 /v1/models 列表导入带能力标注的模型(网关能力扩展),并在设置页编辑各模型的 thinking、vision 等能力
该插件未提供要点说明,请参考仓库 README。
- 安装并启动 DeepSeek Harness:
npx @deepseek-ai/dsh web - 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
- 用 dsh plugins list 确认已安装,必要时重启 Harness 生效
插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。
| 代码仓库 | github.com/dudo-m/dsh-models-import |
| 许可证 | 未标注(见仓库) |
| 主要语言 | master |
| 下载量 | 2 |
| GitHub 星标 | 2 |
| 最近推送 | 2026-08-17 |
| 收录日期 | 2026-09-19 |
| 分类 | 模型与提供方 |
事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。
以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。
# dsh-models-import English | [中文](README.zh.md) A DeepSeek Harness (DSH) plugin that adds a "**Models Pro**" settings section with **capability-aware model import and editing** — the stock Models section stays untouched. - "Fetch available models" recognizes the `capabilities` extensions OpenAI-compatible gateways return in `/v1/models` (vision, reasoning/thinking, tools, search, thinking dialect, …) and adopts them into the imported model entries; - a model row's disclosure edits more than capacities — **can-think (with thinking levels)** and **accepts images** are editable beside context window and max output. ## The problem it solves Stock dsh model discovery reads only the plain OpenAI fields (`id`, `context_window`, `max_output_tokens`) and drops the gateway `capabilities` object; the stock row editor edits capacities only. This plugin: 1. **Host half** registers `POST /plugins/models-import/models` on the web server, fetches `/models` for you (resolving the provider's stored credential), parses `capabilities`, and maps them to `llm-pi-ai` model fields; 2. **Browser half** adds a "Models Pro" settings section (built on an extended copy of the stock page): the same provider cards and editors plus capability-aware fetch and per-model capability editing. The stock Models section keeps running the official implementation — both pages edit the same `settings.yaml`, so you can switch back at any time. ### Capability mapping | gateway capabilities | llm-pi-ai model field | |--------------------------------|---------------------------------------------| | `vision: true` | `input: ['text', 'image']` | | `reasoning: true` / `thinking: true` | `reasoningEfforts` (default `off`+`high`; `off` offered only when `thinkingCanDisable` is true) | | `thinkingFormat` (openai / deepseek / openrouter / together / zai / qwen / string-thinking / ant-ling) | `compat.thinkingFormat` (other formats are left unset for pi-ai's own inference) | | `contextWindow` / `context_length` | `contextWindow` | | `maxOutput` / `max_completion_tokens` | `maxTokens` | `tools` / `search` / `pdf` / `audioInput` … have no llm-pi-ai configuration target yet and ride along as badges in the fetch dialog only. ## Install The `dsh` CLI does not need to be installed globally — every command below goes through npx. ### Option 1: npm install (recommended — one command, no approvals) The npm package ships prebuilt, so installing runs no build scripts at all: ```sh npx -y @deepseek-ai/dsh plugin --profile web add dsh-models-import ``` Restart `dsh web` to activate. Upgrades are the same one command: `... add dsh-models-import@latest`. > **Mirror-registry users** (e.g. npmmirror.com): a freshly published package takes a while to sync; if the install reports `404` or `No matching version`, pin the official registry for the install: > > ```sh > npx -y @deepseek-ai/dsh plugin --profile web add dsh-models-import --registry=https://registry.npmjs.org > ``` ### Option 2: install from GitHub (sources; needs build approval) Prerequisites: pnpm (`npm i -g pnpm` if missing). **Step 1** — run the install command (no global `dsh` needed; npx fetches it): ```sh npx -y @deepseek-ai/dsh plugin --profile web add github:Dudo-m/dsh-models-import ``` **Step 2** — the first run fails while pnpm waits for build approval (a git install pulls sources and must run the `prepare` build script). That is expected. Copy the **exact key from your own error message** (it looks like `dsh-models-import@https://codeload.github.com/Dudo-m/dsh-models-import/tar.gz/` — the key embeds the commit, so copy it verbatim) into the web profile's `pnpm-workspace.yaml`: - Windows: `C:\Users\\.dsh\profiles\web\pnpm-workspace.yaml` - macOS / Linux: `~/.dsh/profiles/web/pnpm-workspace.yaml` ```yaml allowBuilds: 'dsh-models-import@https://codeload.github.com/Dudo-m/dsh-models-import/tar.gz/': true ``` **Step 3** — re-run the same command from step 1. A `+ dsh-models-import github:Dudo-m/dsh-models-import` line means it installed (`prepare` builds automatically during install). > If the retry fails with `ERR_PNPM_ENOENT ... dsh-models-import_tmp_...` (leftover state from the first, blocked attempt), remove and re-add once: > > ```sh > npx -y @deepseek-ai/dsh plugin --profile web remove dsh-models-import > npx -y @deepseek-ai/dsh plugin --profile web add github:Dudo-m/dsh-models-import > ``` > Take the approval seriously: it allows the package's code to run a build on your machine at install time. Only approve repositories you trust, and pin a commit (`github:Dudo-m/dsh-models-import#`). ### Option 3: local clone (development) ```sh git clone https://github.com/Dudo-m/dsh-models-import cd dsh-models-import pnpm install && pnpm run build npx -y @deepseek-ai/dsh plugin --profile web add . ``` `dsh plugin` records it as a `link:` dependency in the web profile (`~/.dsh/profiles/web`) and appends it to `dsh.profile.bundles`; update later with `git pull && pnpm run build` inside the clone. ### Option 4: tarball (no build approval needed) Each release carries a prebuilt tarball on GitHub; install straight from the download URL: ```sh npx -y @deepseek-ai/dsh plugin --profile web add https://github.com/Dudo-m/dsh-models-import/releases/download/v0.1.0/dsh-models-import-0.1.0.tgz ``` You can also `pnpm pack` inside a clone and install from the local path. ### Start / verify ```sh npx -y @deepseek-ai/dsh web ``` Open http://127.0.0.1:3080 → Settings: seeing both **Models** and **Models Pro** means the plugin loaded (restart a running server once so the new plugin loads). ## Uninstall ```sh npx -y @deepseek-ai/dsh plugin --profile web remove dsh-models-import ``` The Models Pro section goes with it; the stock Models section was never touched. Model entries and capability fields already written to `settings.yaml` are ordinary llm-pi-ai configuration — they keep working (the stock editor just shows them as unknown fields). ## Use 1. Settings → **Models Pro** → edit a custom provider (or create one); 2. click "Fetch available models" — the request first takes this plugin's capability-aware route, falling back to stock discovery (with a note) when it cannot answer; 3. pick models in the dialog; badges show what the endpoint reported (thinking / vision / tools / search); 4. expand any row to edit: the thinking toggle, thinking levels (off…max), image input, display name, context window, max output; 5. saving writes `llm-pi-ai.providers..models` in `settings.yaml`; the next request picks it up (no restart). ## Releasing (maintainer) Publishing to npm is what gives users the zero-approval install. Automated flow: 1. add `NPM_TOKEN` under the GitHub repo's Settings → Secrets → Actions (from npmjs.com → Access Tokens → Automation); 2. cut a release: ```sh npm version patch # or minor / major git push --follow-tags ``` The tag triggers [.github/workflows/publish.yml](.github/workflows/publish.yml): build, publish to npm, and attach the tarball to the GitHub release. A one-off manual publish works too (`prepare` builds automatically): ```sh npm login npm publish ``` > If the npm name `dsh-models-import` is taken, rename the package to `@dudo-m/dsh-models-import` (scope = your npm username) and adjust the publish/install commands accordingly. ## Development ```sh pnpm install pnpm run build # emits lib/index.js (host half) and lib/client.js (browser half) pnpm run watch pnpm run typecheck ``` Layout: ``` src/index.ts # host half: the /plugins/models-import HTTP route src/mapping.ts # capabilities → llm-pi-ai field mapping (pure) src/client/index.ts # browser half entry (re-exports the settings page) src/client/settings-models/ # vendored, extended copy of the stock Models page src/client/helpers.ts # capability-field read/write helpers ``` After a DSH upgrade that changes the stock Models page, refresh the vendored copy (`src/client/settings-models/` mirrors `@deepseek-ai/dsh-client-ui-settings-models`'s `src/client`); the integration points are `ModelListEditor.tsx` and `locales.ts`. ## License MIT — see [LICENSE](LICENSE). `src/client/settings-models/` is a vendored, modified copy of the browser half of `@deepseek-ai/dsh-client-ui-settings-models` from DeepSeek's [deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) (MIT); file headers and the third-party notice in LICENSE retain the upstream attribution.
数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。