Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture and allows developers to call different model services through configuration. For users who want to use WorkBuddy or CodeBuddy account-based models but do not want to configure cumbersome API keys, this plugin provides an adapter solution. It connects DSH to the local workbuddy2api proxy, converts private protocols to the standard OpenAI format, and makes it possible to call these models directly within the DSH interface.

Core Features

This plugin mainly addresses two issues: model integration and login state management.

  1. Model Integration: Adds a “WorkBuddy” group to the DSH model selector (Composer or /model command). The model list (such as DeepSeek-V4, GLM-5.x, etc.) is synchronized in real time based on account availability.
  2. Web Login Management: Provides a status capsule in the bottom-right corner of the Web GUI, displaying login and proxy status in real time. It supports completing login directly in the browser without terminal operations.

Environment and Dependencies

Before use, make sure the required components are installed and running on the system.

  1. Local proxy: This plugin does not include workbuddy2api; it must be installed separately.
    • Version requirement: The proxy version must be >= 2.0.4. Lower versions lack authentication headers and may cause login failures.
    • Running method: The proxy must be started on 127.0.0.1:8787 and is responsible for protocol forwarding.
  2. Python environment: The login scripts built into the plugin depend on the system python3 (implemented using the standard library, so no additional virtual environment is required).

Installation and Enablement

After installing the plugin, the dsh web service must be restarted to load the new components.

  1. Install the plugin package:
    dsh plugin --profile web add ./dsh-llm-workbuddy
  1. Restart the Web service:
    dsh web

Usage Steps

After installation is complete, follow these steps in order.

  1. Start the proxy:
    Make sure workbuddy2api is running locally (port 8787). You can verify that the proxy is alive by accessing http://127.0.0.1:8787/health.

  2. Web login:
    Open the DSH Web interface and check the status capsule in the bottom-right corner.

    • If it is red (not logged in), click the “Login” button on the capsule.
    • The browser will open the WorkBuddy authorization page. After scanning the QR code or authorizing, the capsule turns green automatically and displays the account nickname.
  3. Select a model:
    Find the “WorkBuddy” group in the DSH model selector and click to switch models. Reasoning level selection is supported (Low / Medium / High).

Technical Details

Login State Management

The login state file is written by the proxy (usually ~/.codebuddy-session.json). The plugin detects this file to determine the state. If the proxy does not implement the /v1/checkin endpoint, the plugin automatically hides the check-in entry.

Web Widgets

The status capsule in the bottom-right corner is dependency-free native browser JavaScript, injected by DSH’s dsh.client mechanism. The backend route is registered on the HTTP service of dsh web.

Architecture Flow

DSH request -> WorkBuddyAdapter (lib/index.js) -> workbuddy2api (127.0.0.1:8787) -> WorkBuddy/CodeBuddy cloud.

Notes

  • No check-in feature: Because workbuddy2api currently does not implement the /v1/checkin related endpoints, the plugin cannot perform daily check-in.
  • Standard library only: The login scripts are written using the Python standard library and do not depend on uv or complex environments, but require python3 to be installed on the system.
  • Session expiration: If the proxy session expires, click the login capsule in the Web interface again to log in.

Summary

dsh-llm-workbuddy is a lightweight model adapter plugin that integrates WorkBuddy/CodeBuddy services into DeepSeek Harness through a local proxy. It eliminates the need to configure API keys, provides visual login management, and is suitable for developers who need to manage multiple model services uniformly in DSH.