Introduction

DeepSeek Harness (DSH) is a plugin-based agent development framework. In practical development, developers often need to configure multiple API Keys for the same model provider (for example, distinguishing personal accounts from enterprise accounts), or switch between different Keys to balance load. DSH natively supports credential management, but in multi-Key scenarios, manually switching or overriding environment variables is often not intuitive enough and can easily result in configurations not taking effect.

The dsh-key-manager plugin aims to address this pain point. It allows you to maintain a Key pool on the Settings → API Keys page, add notes to each Key, and ensure that switching operations truly take effect on the next model call.

Core Features

This plugin provides the following core capabilities:

  • Provider-based Key pooling: It only lists providers for which Key references are actually configured on the “Model” settings page.
  • Notes and renaming: You can add notes to each Key (such as “personal” or “team”), and you can even rename the Key currently in use.
  • Switching that truly takes effect: When you activate a Key, the plugin writes that value through Harness’ credential mechanism. If native environment variables or a .env file override the default reference, the plugin takes over and points to the reference it manages, ensuring that the next call uses the new Key.
  • Current-in-use locking: The Key currently in use is always shown at the top of the list with a green badge; Keys not managed by the pool are shown as a “live” row.
  • Smart default selection: When the page loads, it automatically preselects the provider behind the currently selected model.
  • Persistence without hard-coding: The registry file is stored in the Harness data directory and does not rely on hard-coded paths.

Installation and Enablement

To install this plugin, use DSH’s Web configuration mode.

dsh plugin --profile web add dsh-key-manager

After installation, restart the dsh web service, then open Settings → API Keys to see the Key management interface.

Typical Usage

  1. Configure your model provider (for example, OpenAI) in Settings → Model.
  2. Go to Settings → API Keys.
  3. Enter your first API Key, add a note (for example, “personal”), and click Activate.
  4. Add a second Key, add a note (for example, “team”), and click Activate.
  5. The next model call will use the Key you just activated. The page displays the currently effective reference source.

Notes

  • Storage security: Key values are stored in plaintext under the Harness data directory (~/.dsh/dsh-key-manager.). The security level is consistent with Harness’ own .credentials.yaml. If you are using a shared machine, be sure to restrict access to that directory.
  • Ecosystem note: The DSH plugin catalog is not affiliated with DeepSeek or High-Flyer. This plugin is maintained by community developers.
  • License: It follows the MIT License.

Summary

dsh-key-manager is a practical tool for managing multiple accounts in DeepSeek Harness. Through Key pooling and a forced-effective mechanism, it simplifies Key switching and is suitable for developers who need fine-grained management of API resources. For more details and the source code, refer to its GitHub repository.