dsh-cliproxyapi-pro: Integrating CLIProxyAPI Models into the DSH Model Selector

Preface

When chatting or running Agents in DeepSeek Harness (DSH), models typically come from DSH’s built-in routing or provider configurations you write manually. If the upstream is actually running CLIProxyAPI (CPA)—which unifies various CLI / API channels into an OpenAI-compatible endpoint—you encounter a different set of problems: the model catalog on CPA is long, with varying capabilities and protocols. Manually writing every model into DSH is time-consuming and prone to selecting the wrong protocol (Chat / Responses / Messages). This is especially pronounced with multiple accounts and keys.

Here we introduce the community plugin dsh-cliproxyapi-pro (maintainer TinyBOOOOM): after entering the service address and API Key, it fetches the model catalog from CPA, syncs selected models (along with context length, image input, reasoning tiers, etc.) to the DSH model selector, and routes requests using the most appropriate protocol based on the model family. Classified under “Model Inference,” the plugin is compatible with DSH 0.2.0-rc.1 and above (Desktop and Web versions). The current npm package version is 1.7.0, licensed under MIT.

What is this

dsh-cliproxyapi-pro is a CPA integration and visual management plugin for DSH: it does not register Agent tools nor occupy model context; API Keys are stored in DSH’s credential service, not written into config files. It supports connecting multiple CPA accounts simultaneously, with independent addresses, keys, model selections, and enabled statuses for each account.

Compared to “just manually writing a single OpenAI-compatible base URL in DSH,” it focuses on three things: automatically reading CPA’s rich metadata model catalog, selecting native protocol routing by family, and checking models and viewing channel quotas (requires CPA management key) within the settings panel.

Core Features

Auto-discovery and Model Sync

  • The service address can be local or remote; suffixes like /v1, /v1/chat/completions are automatically normalized.
  • If the address is left blank, it attempts the following in order: existing routing address, environment variable CLIPROXYAPI_BASE_URL, or local 127.0.0.1:8317.
  • Reads the catalog via /v1/models?client_version=pi (compatible with standard OpenAI data[]), using owned_by to determine model family; accounts auto-refresh at a default 300-second interval, and settings are not overwritten if the catalog remains unchanged.

Out-of-the-box Model Selection

On the first successful connection, if no selection has been saved previously, it automatically selects the latest model for each family based on the CPA catalog (up to 12 models), preventing the selector from being overwhelmed by hundreds of models. It supports search, family filtering, bulk operations, “Restore Recommended Picks,” and include/exclude keyword rules. Only selected models appear in the model selector; an empty selection implies showing all.

Single models allow Parameter Editing: Context Window, Max Output, Image Input, Thinking Level (off, minimal, low, medium, high, xhigh, max), and Request Protocol, with options to restore auto-detected values.

Multi-account and Protocol Routing

Each account is grouped by account name in the model selector; disabled accounts remove routing but retain configuration. Routing IDs are cli-proxy, cli-proxy-responses, cli-proxy-messages in order (second and third accounts get -2, -3 suffixes, etc.); key references are named CLI_PROXY_API_KEY, CLI_PROXY_API_KEY_2…

Default Auto Protocol minimizes conversion on the CPA side:

Model Family Protocol Route (First Account Example)
Claude (including devin/claude-*, etc.) Anthropic Messages cli-proxy-messages
OpenAI / Codex / GPT, xAI Grok OpenAI Responses cli-proxy-responses
Gemini, DeepSeek, Kimi, GLM, etc. OpenAI Chat cli-proxy

You can change this to use a unified protocol or specify it in single model parameters.

Quota and Updates

The account page features three tabs side-by-side: Connection / Models / Quota. By filling in the CPA management key (remote-management.secret-key; remote requires remote-management.allow-remote) on the Quota page, you can view quotas grouped by channel; the badge on the left side of the model selector displays the most sufficient remaining quota among available credentials for the current model (only for synced accounts with the management key filled in).

The plugin supports checking Stable / Beta / Dev channels and optional global or China mainland download sources; if dsh-market is installed, new versions can be installed via one click or automatically. The package declares zero dependencies and requires no build.

Installation and Activation

Choose any official method; to pin a version, write dsh-cliproxyapi-pro@1.7.0.

Method 1 (Recommended): In DSH, go to the left Plugins → Add Plugin, and enter the package name:

dsh-cliproxyapi-pro

Enable immediately after installation; users in China mainland can switch the Install Source to a mirror.

Method 2: Ask the Agent to install in the chat box, for example:

Help me install the DSH plugin dsh-cliproxyapi-pro

Method 3: Command line (replace <profile name> with your profile, usually desktop for the desktop version):

dsh plugin --profile <profile name> add dsh-cliproxyapi-pro

If DSH is running, a restart is required for the installation to take effect.

Method 4: Install from GitHub, for example, fill in the Add Plugin field:

git+https://github.com/TinyBOOOOM/dsh-cliproxyapi-pro.git#v1.7.0

Or download dsh-cliproxyapi-pro.tgz from Releases and fill in the local absolute path.

Typical Usage

  1. Open Settings → CLIProxyAPI on the left (Accounts, Models, Protocols are here; plugin updates are under Plugins → CLIProxyAPI or Settings → Built-in Plugins → CLIProxyAPI).
  2. Click + Add Account, fill in the Name, Service Address (e.g., http://127.0.0.1:8317, no /v1 needed), and API Key (can be blank for local CPA without authentication), then click Connect. Success creates and enables it; failure allows viewing the reason or choosing “Add anyway (Do not enable)”.
  3. In the Models tab, adjust the selection as needed, then click Save and Apply at the bottom.
  4. Return to the chat box and select a model from the group named after the account.

If the local CPA uses the default port 8317 and has no key, the plugin can auto-discover it without needing to fill in the address first. You can also let an Agent configure it after installation by specifying the CPA address and key.

Scenarios and Notes

Suitable for: Users already using or planning to use CPA to aggregate multiple channels, who want a GUI in DSH to select models, manage multiple accounts, view quotas, and preferably let Claude / GPT use native Messages or Responses protocols.

Notes:

  • The plugin runs with the current DSH process permissions; before installation, please review the GitHub repository source code and MIT license to ensure compliance with your security and compliance requirements.
  • Accounts with a filled service address only connect to that address; if connection fails, it reports an error rather than silently falling back to local :8317, to avoid multiple accounts mistakenly pointing to the same service.
  • Quota and management interfaces depend on CPA-side remote-management configuration; if not configured, model sync and chatting are still available, but quota page capabilities are restricted.
  • The community directory SkillHub Plugin Page has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem emphasizes “Everything is a Plugin,” so refer to the repository README and npm package for details.

Conclusion

dsh-cliproxyapi-pro consolidates CPA’s model catalog and protocol selection into DSH settings and the model selector, reducing manual routing and maintenance costs. For details, slash commands, HTTP interfaces, and FAQs, please refer to the repository documentation.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye