Introduction

DeepSeek Harness (DSH) uses a plugin-based architecture, allowing users to extend functionality through plugins. When using PackyCode (PackyAPI) as a model provider, you usually need to configure a provider separately or modify YAML files. The DSH PackyCode API plugin is designed to solve this pain point. It integrates PackyCode key management, model routing, and balance querying directly into DSH.

Plugin Overview

This is a model inference plugin maintained by BaronCyrus and licensed under the MIT License.
Its core value is: using a PackyCode API key to select models, rotate keys, and view balances inside DSH.

Core Features

Based on verified facts, the plugin provides the following capabilities:
* Built-in model routing: After installation, a PackyCode group appears in the model selector, with no need to configure a provider or modify cordis.patch.yml.
* Sequential multi-key usage: When the quota is exhausted or a key is rejected, it automatically switches to the next available key.
* Key selection by group: Supports selecting models based on the PackyCode group that contains a key.
* Balances at a glance: The settings page lists each key’s remaining balance, used amount, quota, and total.
* Local credential management: Keys are stored only in the DSH credential file, and browsers cannot access them in plaintext.
* Claude local CLI: Certain Claude models can be executed through the official local CLI on your machine.
* Web search integration: Optionally, DSH’s web_search can be handed over to PackyCode.
* Image generation and editing: Supports generation and editing with the GPT Image model series.

Installation and Activation

  1. Prepare DeepSeek Harness and a PackyCode API key.
  2. Open the desktop app’s Plugins page and click Add Plugin.
  3. Enter a versioned package name in Package Name or URL:
dsh-packycode-api@1.2.9
  1. Select Official Source in Installation Source, then click Install.

    Note: Always include the version number. If you only enter dsh-packycode-api, DSH’s default pnpm may install an older version, and the installation prompt may not show actual version differences. After installation, you can verify it under Settings → PackyCode → Plugin Version.

Daily Usage

  1. Add a key: Open Settings → PackyCode, paste an API key in Add Key, then click Add.
  2. Select a model: In the conversation model selector, choose a model under the PackyCode group.
  3. Configure displayed models: In Settings → PackyCode → Displayed Models, check the models you want to show.
  4. Switch keys: Click Switch to This Key to specify the preferred key. Keys are used in the order they were added.
  5. View balances: Account and Keys shows each key’s remaining balance and total quota. Refresh bypasses the approximately 60-second cache.

Notes

  • Local development: For local development, add the link: prefix (for example, dsh plugin --profile <name> add link:/path/to/dsh-packycode-api). Do not write the filesystem path or file: directly, otherwise the entire repository may be copied into the profile.
  • Credential security: Keys are stored only in the DSH credential file. Browsers can only see notes, status, and balances. The plugin does not read the PACKY_CODE_API_KEY environment variable.
  • Network issues: The old default endpoint https://www.packyapi.com suffers from DNS pollution under mainland China networks. The plugin will automatically try the .ai suffix or prompt you to configure the API endpoint.
  • Privacy: Do not paste keys into public issues, chat records, or screenshots.

Conclusion

The plugin simplifies the workflow for using PackyCode inside DSH and achieves seamless integration from key management to model routing. It is suitable for developers who frequently switch between model providers or manage multiple keys. For more details, see the GitHub repository.