deepseek-harness-model-config

27Stars1Forks0Issues0Watchers

Add a "Model Advanced Configuration" page to DeepSeek Harness Web UI, supporting custom OpenAI/Anthropic endpoints with per-model context and inference intensity settings.

Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
JavaScript
License
MIT
Branch
main
dsh-plugindsh-plugin-marketdsh-plugin-verifydsh-plugins

Install

$ dsh plugin --profile web add github:MarvekG/deepseek-harness-model-config

Run 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.json to 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 via window.__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 in settings.section slot
  • 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

DependencyMin VersionDescription
DeepSeek HarnessNot declaredPlugin 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.jsNot declaredPlugin code only uses export const syntax
PlatformmacOS / Windows / LinuxCross-platform, no OS / CPU platform checks or native modules in source
Native modulesNoneOnly uses browser-side React and host built-in RPC

Installation

dsh plugin --profile web add github:MarvekG/deepseek-harness-model-config

Configuration Options

ConfigTypeDescriptionDefault
Endpoint NamestringDisplay name for provider route and derived credential reference stem, must start with lowercaseNone
Endpoint URLstringRoot address for provider requests and model discovery, requires http or https protocol, e.g., https://gateway.example/v1None
API ProtocolenumOptions: openai-completions / openai-responses / anthropic-messagesopenai-completions
API KeystringWritten to Harness credential system, won't enter config fileNone
Custom Headerkey/valueAttached when calling models, not attached during GET /modelsNone
Default Context WindowintegerFallback value when model entry and built-in models have no context size262144
Default Max OutputintegerFallback value when model entry and built-in models have no max output32768
Default Input ModalityenumFallback input type when model not declared (text/image)[text]
Default Reasoning EffortenumProvider route-level default reasoning effort, from off to maxNone
Reasoning Budgetkey/valueSet token budget for each level for reasoning services that support budgetNone
Reasoning CompatibilityobjectOnly valid for openai-completions route, controls thinkingFormat, supportsReasoningEffortNone
Cache Retentionenumnone / short / longpi-ai default
Transportenumsse / websocket / websocket-cached / autopi-ai default
Request Timeoutinteger(ms)Provider SDK/HTTP request timeout0 (determined by underlying)
WebSocket Connection Timeoutinteger(ms)WebSocket handshake timeoutNone
Stream Idle Timeoutinteger(ms)Max idle time allowed for single provider read300000
Retry StrategyobjectIncludes retry mode, retryable status codes, max attempts, backoff initial/ceiling, jitter ratiodsh-llm-retry default
Per-Model ContextintegerMax context this model can carryInherited from route default or built-in model
Per-Model Max OutputintegerModel's max output capability, also used as default maxTokens for model requestsInherited from route default or built-in model
Per-Model Input ModalityenumSupported input type list (text/image)Inherited from route default or built-in model
Per-Model Reasoning EffortmapSelect 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.md for 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)

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](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.

← Back to plugin directory