Add a "Model Advanced Configuration" page to DeepSeek Harness Web UI, supporting custom OpenAI/Anthropic endpoints with per-model context and inference intensity settings.
- Language
- JavaScript
- License
- MIT
- Branch
- main
Install
$ dsh plugin --profile web add github:MarvekG/deepseek-harness-model-configRun the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial
Install via your agent
Install the DeepSeek Harness plugin MarvekG/deepseek-harness-model-config for me: review the repository at https://github.com/MarvekG/deepseek-harness-model-config.git first, then run the install command and verify the plugin loads successfully.
Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.
One-Line Description
Adds a "Model Advanced Configuration" settings page to the DeepSeek Harness Web UI, enabling creation of custom model endpoints (OpenAI/Anthropic protocols) without restarting DSH, pulling public model lists from endpoints, and configuring capabilities like context windows, max output, and reasoning effort per model.
Core Features
- Add custom endpoints: Fill in name, URL, API Key and protocol, saved immediately available in session selector
- Support three API protocols: openai-completions, openai-responses, anthropic-messages
- One-click fetch model candidates: Pull candidate list via OpenAI-compatible
GET /models, provide select all/deselect all/none - Configure capability parameters by model: context window, max output, input modalities (text/image), reasoning effort
- Auto-complete from models.dev: After pulling, use
https://models.dev/api.jsonto auto-complete missing context, max output and reasoning info - API Key only goes through Harness credential system: will not be written to
settings.yaml, also won't appear in config preview
Technical Implementation
- Language: JavaScript (ESM
type: "module") - Key dependencies: DSH built-in client plugins
@deepseek-ai/dsh-client-runtime/@deepseek-ai/dsh-client-ui-settings/@deepseek-ai/dsh-client-locale/@deepseek-ai/dsh-api-remotes(injected viawindow.__ModuleLoader__.load) - Architecture: Cordis dual-end plugin, host side only declares Loader name
models-config-plugin, doesn't register any services, all read/write goes through host's existing settings RPC; client side registers "Advanced model config" page insettings.sectionslot - Entry files:
src/index.js(Host, 8 lines) +src/client.js(Client, 1661 lines React) +cordis.patch.yml(bundle injection declaration)
Use Cases
When you need to connect DSH to a local OpenAI-compatible gateway (like one-api / new-api / self-developed proxy) or Anthropic-compatible service, only want to add/remove models in UI text, unwilling to manually write settings.yaml; or when you want certain models to support custom reasoning effort, custom headers, or set default context/max output for endpoints without declared capacity.
Prerequisites & Compatibility
| Dependency | Min Version | Description |
|---|---|---|
| DeepSeek Harness | Not declared | Plugin uses dsh.bundle.patch, requires host to have loaded llm-pi-ai adapter and support settings.section / settings.mutate / credentials.set etc extension points |
| Node.js | Not declared | Plugin code only uses export const syntax |
| Platform | macOS / Windows / Linux | Cross-platform, no OS / CPU platform checks or native modules in source |
| Native modules | None | Only uses browser-side React and host built-in RPC |
Installation
dsh plugin --profile web add github:MarvekG/deepseek-harness-model-config
Configuration Options
| Config | Type | Description | Default |
|---|---|---|---|
| Endpoint Name | string | Display name for provider route and derived credential reference stem, must start with lowercase | None |
| Endpoint URL | string | Root address for provider requests and model discovery, requires http or https protocol, e.g., https://gateway.example/v1 | None |
| API Protocol | enum | Options: openai-completions / openai-responses / anthropic-messages | openai-completions |
| API Key | string | Written to Harness credential system, won't enter config file | None |
| Custom Header | key/value | Attached when calling models, not attached during GET /models | None |
| Default Context Window | integer | Fallback value when model entry and built-in models have no context size | 262144 |
| Default Max Output | integer | Fallback value when model entry and built-in models have no max output | 32768 |
| Default Input Modality | enum | Fallback input type when model not declared (text/image) | [text] |
| Default Reasoning Effort | enum | Provider route-level default reasoning effort, from off to max | None |
| Reasoning Budget | key/value | Set token budget for each level for reasoning services that support budget | None |
| Reasoning Compatibility | object | Only valid for openai-completions route, controls thinkingFormat, supportsReasoningEffort | None |
| Cache Retention | enum | none / short / long | pi-ai default |
| Transport | enum | sse / websocket / websocket-cached / auto | pi-ai default |
| Request Timeout | integer(ms) | Provider SDK/HTTP request timeout | 0 (determined by underlying) |
| WebSocket Connection Timeout | integer(ms) | WebSocket handshake timeout | None |
| Stream Idle Timeout | integer(ms) | Max idle time allowed for single provider read | 300000 |
| Retry Strategy | object | Includes retry mode, retryable status codes, max attempts, backoff initial/ceiling, jitter ratio | dsh-llm-retry default |
| Per-Model Context | integer | Max context this model can carry | Inherited from route default or built-in model |
| Per-Model Max Output | integer | Model's max output capability, also used as default maxTokens for model requests | Inherited from route default or built-in model |
| Per-Model Input Modality | enum | Supported input type list (text/image) | Inherited from route default or built-in model |
| Per-Model Reasoning Effort | map | Select level from off/minimal/low/medium/high/xhigh/max and set corresponding "network spelling" | From models.dev match or user manual declaration |
See
docs/llm-pi-ai-parameters.mdfor complete field table of endpoint advanced parameters and per-model parameters.
FAQ
Q: Does this plugin conflict with DSH's built-in Models settings page?
A: Under standard Web profile, both will be visible simultaneously. DSH design explicitly makes them mutually exclusive. This plugin can run independently after disabling the ui-settings-models line at profile level, otherwise two UIs will modify the same config (src/client.js:1232, docs/model-config-plugin-design.md:188).
Q: Where is the API Key written, will it leak to settings.yaml?
A: No. The plugin only writes credential references (like MY_ENDPOINT_API_KEY) through Harness's credentials service. The real key is only submitted once in memory and won't appear in plain text in settings.yaml or config preview (package.json:5-7, README.md:18).
Q: Which API protocols are supported?
A: Currently provides three dropdown options: openai-completions, openai-responses, anthropic-messages. When fetching model candidates, anthropic-messages will automatically be switched to OpenAI-compatible GET /models because model lists are generally in OpenAI format (src/client.js:1375-1377, 1181).
Q: Can it work normally when models.dev is unreachable?
A: Yes. Endpoint-returned models can still be manually checked and edited, but context, output, input modality, and reasoning capabilities won't be auto-completed. After submission, it will prompt "Endpoint results still editable" (src/client.js:136, 270, 1184, README.md:37).
Q: When editing a saved endpoint, if the API Key field is left blank, will it overwrite the original Key?
A: No. Leaving blank means "continue using existing credentials". Only when a new value is filled will credentials.set be called to update (docs/model-config-plugin-design.md:140).
Q: How to uninstall and update?
A: Both require first remove then add:
dsh plugin --profile web remove dsh-models-config-plugin
dsh plugin --profile web add github:MarvekG/deepseek-harness-model-config
dsh web
(README.md:62-77)
Q: When re-fetching models, will already checked ones be cleared?
A: No. Already checked models keep their check status, newly appearing models are unchecked by default, models no longer returned by endpoint will also remain displayed to avoid accidental deletion during refresh (src/client.js:1171-1174, README.md:13).
Q: Can I configure global custom Headers for an endpoint? Will they also be included when fetching models?
A: Custom Headers can be added in endpoint advanced parameters, but Headers are only attached when calling models, not in GET /models requests (README.md:30, docs/llm-pi-ai-parameters.md:37).
Difficulty
Beginner — Just fill in the form in Web UI, no manual YAML writing needed; understanding DSH's profile / plugin concepts and having a ready OpenAI/Anthropic-compatible gateway address is enough to get started.
Known Issues & Limitations
- Model fetching only covers OpenAI-compatible
GET /models; model lists for other protocols (like pure Anthropic protocol endpoints) require manual editing (docs/model-config-plugin-design.md:225) - When models.dev doesn't provide reasoning info for a model, the UI won't guess capabilities for users; users need to add reasoning levels themselves (
docs/model-config-plugin-design.md:226) - Independent plugin form is mutually exclusive with DSH's built-in
ui-settings-models: when enabling this plugin in profile, should disable the original Models settings line, otherwise both UIs will modify the same config simultaneously (docs/model-config-plugin-design.md:188, 227) - Model discovery has a 4MB receive limit; 401/403 are attributed to credential issues, unreachable/non-JSON are categorized as "fetch failed" (
docs/model-config-plugin-design.md:198)
English | 中文
为 DeepSeek Harness Web UI 添加“模型高级配置”页面,用于创建自定义模型端点并配置每个模型的能力参数。
功能
- 新增自定义端点:名称、URL、API Key 和协议。
- 支持在 provider 层配置自定义请求 Header,并应用于模型请求。
- 支持
openai-completions、openai-responses、anthropic-messages。 - 通过统一的
GET /models流程获取候选模型,支持全选、反选和全不选。 - 新增端点和已保存端点共用编辑器;已保存端点可重新拉取模型,新增模型默认不勾选,已有勾选模型在刷新后保留。
- 端点高级参数支持默认容量、输入模态、推理兼容、缓存、传输、超时和重试策略。
- 从
models.dev补全缺失的上下文窗口、最大输出、输入模态和推理能力;优先按模型名称选择官方 provider,找不到时选择默认 provider,并可在保存前切换完整 provider 记录。 - 在保存前编辑每个模型的容量、文本/图片输入和
reasoningEfforts,并查看不含密钥的配置预览。 - 所有界面文案支持中文和英文,跟随 Harness 语言设置。
- API Key 仅经 Harness 凭据存储写入,不会进入
settings.yaml或配置预览。
完整参数说明:llm-pi-ai 参数参考。
打开设置
新增端点
端点名称、BASE_URL、API-KEY,然后点击获取模型,把想要的模型勾选上:
参数补充
- 端点高级参数:一般保持默认即可。自定义 Header 仅用于模型请求;“获取可用模型”仍使用 API Key。
- 模型参数:主要检查上下文大小和最大输出长度。
模型参数一般能自动填写,前提是要能访问 https://models.dev
安装
需要已安装并可运行的 dsh。默认从 GitHub 安装:
dsh plugin --profile web add github:MarvekG/deepseek-harness-model-config
dsh web
打开 Web UI 的“设置 → 模型高级配置”,即可新增端点或编辑现有 llm-pi-ai 模型配置。
如需固定版本,在仓库地址后附加 commit SHA,例如 github:MarvekG/deepseek-harness-model-config#<sha>。
本地调试
克隆本仓库后,在仓库根目录以本地 link: 依赖安装:
dsh plugin --profile web add .
dsh web
卸载
从 Web profile 移除插件:
dsh plugin --profile web remove dsh-models-config-plugin
更新
更新使用“卸载旧版本,再安装新版本”的方式:
dsh plugin --profile web remove dsh-models-config-plugin
dsh plugin --profile web add github:MarvekG/deepseek-harness-model-config
dsh web
本地调试时,将第二条命令替换为 dsh plugin --profile web add .。
许可证
友链
Listing badge
[](https://deepseek-plugin.org/plugins/MarvekG/deepseek-harness-model-config)Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.