Preface¶
When connecting to OpenAI-compatible gateways like WorkBuddy2API in DeepSeek Harness (DSH), the common practice is to manually write the provider routing in cordis.patch.yml. While @deepseek-ai/dsh-llm-pi-ai allows configuration of id, name, contextWindow, and maxTokens, thinking levels (reasoningEfforts) often need to be added manually; the settings interface also lacks controls for these levels, leading to high maintenance costs. Furthermore, after adding or removing models on the gateway, you usually have to modify the configuration and restart DSH for changes to take effect.
The following introduces the community plugin dsh-workbuddy2api-connect (Maintainer: che246, Category: Workflow). It fetches model names, thinking levels, max context, max output, and image capabilities from the gateway’s GET /v1/models, maps them, and registers them into DSH. It also provides a visual panel to add/delete routes, change group names/URLs/Keys, and applies changes via hot re-registration upon saving. This eliminates the need to manually write complete routing tables or restart the service to change routes.
What is this¶
dsh-workbuddy2api-connect is a bundle plugin for DSH that automatically syncs the model catalog from the WorkBuddy2API gateway to the host and injects a browser-side configuration card. The data flow is roughly as follows:
WorkBuddy2API Gateway GET /v1/models
│ id / name / reasoning_supported_efforts / context_length / max_output_tokens / supports_images
▼
dsh-workbuddy2api-connect (Fetch table → Map → Register provider; Interface handles route addition/deletion)
▼
DSH @deepseek-ai/dsh-llm-pi-ai → A group in the model selector (Model + Reasoning Level + Context Window)
- Catalog Page: SkillHub Plugin Page
- Source Code & Docs: GitHub che246/dsh-workbuddy2api-connect
- License: MIT (see repository
package.json)
The plugin runs with the permissions of the current DSH process; it is recommended to review the source code and license before installing. The community directory SkillHub is an independent site and has no official affiliation with DeepSeek / High-Flyer.
Core Features¶
Automatic Model List Sync¶
The plugin requests /v1/models from the configured gateway’s OpenAI-compatible address and assembles the returned fields into a model list usable by DSH providers, including:
- Model id / Display name
- Thinking levels (
reasoning_supported_efforts) - Max context (
context_length) - Max output (
max_output_tokens) - Image support (
supports_images)
The cordis.patch.yml layer allows configuration of refresh intervals, timeouts, etc. For example:
- id: llm-workbuddy2api
name: dsh-workbuddy2api-connect
config:
refreshMinutes: 30 # Model list refresh interval (minutes)
timeoutMs: 20000 # Timeout for a single model list request
showRate: true # Append credit multiplier to model name (display only)
maxTokensCap: 0 # Output limit clamping (0 = no clamping)
The “seed” for routes can be written in config.routes within the same file; it will be written to $DSH_HOME/.workbuddy2api-connect.json only once if that JSON file does not exist. Subsequently, the interface save or manual JSON editing takes precedence to avoid conflicting configurations.
Visual Panel: Routes & Credentials¶
After installation and a DSH restart, open the “Plugins” section in the left sidebar and operate within this plugin’s configuration area (DSH 0.2.0’s plugins.bundle.config, distributed by package name dsh-workbuddy2api-connect).
Each route has a card with three inputs and a status line:
| Field | Description |
|---|---|
| Group Name | The group name displayed in the model selector (e.g., work2api-CN) |
| URL | The gateway’s OpenAI-compatible base address (e.g., http://192.168.1.201:7863/v1) |
| Key | Gateway API Key; write-only (not echoed). Leave empty if already saved to indicate no change |
The route id (= provider name) and credential name are automatically derived from the Group Name (Non-ASCII names like Chinese will fallback to rules like wb2api, see README for details). The route id is derived only upon creation; changing the group name only changes the display name and will not invalidate the {provider, model} references in existing sessions.
Bottom buttons: Save & Apply (Write + Hot Re-register + Re-fetch model list), Refresh Model List Now, Reload. The status line summarizes the model count, context range, thinking levels, and last refresh time; gateway errors are displayed as-is upon fetch failure (e.g., HTTP 401 invalid_api_key).
Keys are written to the DSH credential store (ctx.credentials refs, i.e., ~/.dsh/.credentials.yaml); the plugin configuration file contains only the credential name, with no plaintext Key.
Model Selection (Enable / Exclude)¶
Each route card has a collapsible “Model Selection (Enabled N / Total M)” section:
- Checked indicates enabled; unchecked models go into
excludeand are not registered to DSH - Supports Select All / Select None and keyword filtering
- When creating a new route, you can click “Fetch Models (Fetch from gateway using current URL / Key)” (
POST /probe, does not persist to disk) to list the inventory in place; common network and authentication errors will be shown on the card
The design adopts “Exclusion” rather than a fixed whitelist: new models on the gateway are available by default, preventing expired whitelists from blocking new models.
Display Toggle: Work Details “Fully Expanded”¶
The top of the card allows toggling DSH’s ui-chat.transcriptView (default standard; enabled becomes verbose, where turns are not collapsed, and commands and thinking are fully expanded). This syncs with Settings → General → Work Details, takes effect immediately, and requires no restart. In headless hosts without a settings service, the toggle is disabled, which does not affect gateway synchronization.
Installation & Activation¶
After installation or upgrade, a DSH restart is required once (to register the provider and client card upon boot); subsequently, changes to routes or model lists generally do not require a restart.
Web / TUI¶
dsh plugin --profile web add https://github.com/che246/dsh-workbuddy2api-connect/releases/download/v0.5.0/dsh-workbuddy2api-connect-0.5.0.tgz
Desktop Version (Manual config modification before install recommended)¶
README Note: dsh plugin add may rewrite dsh.profile.bundles and squeeze out other third-party bundles; it is recommended to place the Release attachment in a local directory, modify package.json’s dependencies and dsh.profile.bundles, then execute dsh plugin --profile desktop install.
copy dsh-workbuddy2api-connect-0.5.0.tgz "$env:USERPROFILE\.dsh\local-plugins\"
Edit %USERPROFILE%\.dsh\profiles\desktop\package.json: add a file: dependency pointing to the tgz under dependencies, and append "dsh-workbuddy2api-connect" to dsh.profile.bundles, then:
cd "$env:USERPROFILE\.dsh\profiles\desktop"
$dsh = "D:\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd"
& $dsh plugin --profile desktop install
If using dsh plugin --profile desktop add "<attachment path>", please verify that dsh.profile.bundles still contains other plugins after installation.
Packaging from Source¶
npm pack
Then install the generated .tgz using the Desktop or Web / TUI method.
Typical Usage¶
- Install the plugin using the method above and restart DSH.
- Open the Plugins page, add or edit a route: fill in the Group Name, gateway
…/v1base address, and Key. You can click Fetch Models first to verify the list and error messages. - In Model Selection, check the models to expose to DSH, and click Save & Apply.
- In the model selector, choose the model and reasoning level under the corresponding group to start a conversation normally.
On first launch, if only the seed routes from cordis.patch.yml exist (e.g., default work2api-AI / work2api-CN), ~/.dsh/.workbuddy2api-connect.json will be written. You can also override the seed by adjusting the same id in the profile’s cordis.patch.yml, and then maintain it via the interface.
Use Cases & Notes¶
Who is it for: Developers who are already using or planning to use the WorkBuddy2API gateway, wish to automatically align the model catalog and thinking levels within DSH, and want to manage multiple gateways via an interface.
Compatibility: The README records that a common reason for the plugin “disappearing” after DSH updates is the dsh.profile.bundles in the profile being reset, or peer judgment issues with pre-release versions; the plugin no longer declares @deepseek-ai/dsh-* peers. You can use node tools/check-compat.mjs and node tools/dump-profile.mjs in the repository for self-checks.
Security & Permissions: The plugin reads gateway URLs, writes credential references, and accesses the network with the identity of the DSH process; please review the source code at the GitHub Repository before installing. Node engine requirements are listed in package.json: ^22.19.0 || >=24.0.0.
Conclusion¶
dsh-workbuddy2api-connect automates the “Gateway /v1/models → DSH provider” pipeline and uses a panel to handle route and model enablement, reducing the need for manual cordis.patch.yml editing and frequent restarts. For more information, see the SkillHub Directory Page and GitHub README.