Preface

DeepSeek Harness (dsh) treats model adapters, tools, conversations, and interfaces all as plugins. The official repository’s slogan is Everything is a Plugin: to switch model providers, you usually do not need to modify the Harness source code, just add a bundle to the current profile. Community members have already connected various cloud vendors, proxies, and local models to this framework.

Command Code is another multi-model gateway with subscription quotas. You can often see DeepSeek, Qwen, Kimi, MiniMax, and Claude/GPT/Gemini/Grok available under specific plans in your account. Many people want to use these quotas directly in dsh web instead of opening another CLI session. Command Code provides an OpenAI/Anthropic-compatible Provider API externally; its own CLI actually uses another generation endpoint POST /alpha/generate.

dsh-commandcode-provider connects via the latter endpoint: it registers a native commandcode provider in DeepSeek Harness, and translates conversation requests to the generation endpoint used by the CLI. This is not an official plugin from DeepSeek or Command Code, and the community directory deepseek-harness-plugin.com is an independent indexing site with no affiliation to DeepSeek / HyperMind.

What This Is

dsh-commandcode-provider is a model and provider plugin maintained by Mars-Sea, with the npm package name @mars-sea/dsh-commandcode-provider (the bare name dsh-commandcode-provider is occupied by an unrelated package). The version in the current repository’s package.json and on the npm page is 0.4.0 (released 2026-08-17), licensed under MIT. The community directory page marks the license as NOASSERTION, please refer to the LICENSE and package.json in the repository for the actual license.

It is ported from pi-commandcode-provider (also MIT licensed). The README states that the request format corresponds to the official CLI command-code@1.26.0, obtained by reverse-engineering the original pi plugin. This is a community integration: you need your own Command Code account, API key, or subscription, and must comply with the service terms of the other party; this project has no affiliation with Command Code, Inc.

There is a line on the directory page saying “Let Command Code use DeepSeek Harness’s models directly”. According to the repository README and the description in package.json, the direction is actually the opposite: it is to let DeepSeek Harness call the models under your Command Code account. The following content is based on the official documentation of the repository.

Core Features

According to the repository README and the CHANGELOG for version 0.4.0, the verified capabilities can be divided into the following sections.

1. Real-Time Model Catalog

After the plugin registers the commandcode route, it will request GET {apiBase}/provider/v1/models to pull the current catalog, and cache it in ~/.commandcode/models-cache.json. The catalog endpoint is public and can be browsed without an API key; actual inference requests go through POST /alpha/generate, which requires an API key.

Each model in the selector will have a set of labels: the minimum plan required to use it (KNOWN_PLANS), active discounts or FREE badges (expired discounts will be hidden automatically), Peak / Half for time-based pricing models, Image for Vision models, and context length (1M / 256K / 262K). The list is sorted by plan: Go → GOAT → Pro → Provider/Max, and models available under your current plan are listed first.

Starting from version 0.4.0, the selector will hide models that exceed your subscription tier by default. The judgment is based on the account billing status. If the billing interface is unavailable, the plan is unknown, or the account has on-demand balance (the official CLI treats this as unlocking all models), the plugin will fall back to open mode and continue displaying the full catalog; the server is still the final gatekeeper, and models not in your plan will return MODEL_NOT_IN_PLAN (403). You can turn off “Hide out-of-plan models” in the settings page, or set filterModelsByPlan: false in the configuration.

2. Dedicated Settings Page and Models Card

After installing and restarting the web application:
- Settings → Command Code: API key input field, API address, working directory, request/stream timeout, and the “Hide out-of-plan models” toggle. The API key is stored via the dsh credential service, written to $DSH_HOME/.credentials.yaml, and only written without being displayed back; connection parameters are written to the llm-commandcode section, taking effect for the next request without restarting.
- After configuring the key, an Account Usage card will appear at the top of the same page: request statistics, quotas, 5-hour/weekly window progress bar, plan badges, and billing cycle deadline. Data is pulled in the host process, and the browser does not hold the API key.
- Settings → Models: A Command Code card will appear; the model selector will list the real-time catalog under the commandcode group.

3. Inference Strength and Images

For models marked with reasoning in the official catalog, the plugin exposes reasoning-effort in accordance with KNOWN_EFFORTS (aligned with command-code@1.26.0). Models that do not have tiers but still perform thinking will automatically enable reasoning, matching the behavior of the official CLI.

Models with Vision capabilities can send images via the dsh attachment service; plain text models will explicitly reject requests (UNSUPPORTED_CONTENT) instead of silently discarding images. The official CLI has an additional client-side VICE fallback call for plain text models, but this plugin does not replicate this behavior — you need to switch to a model marked with Image.

4. API Key Resolution Order

The same API key can be sourced from multiple places, with the following priority:
1. Literal config.apiKey in the combined configuration
2. Credential reference apiKeyEnv (default: COMMANDCODE_API_KEY)
3. Environment variables set at startup
4. Official CLI login file ~/.commandcode/auth.json (written by command-code login / cmd login)

The last option is a fallback. If the card shows “Not Configured” but the request actually succeeds, it is most likely using the key from auth.json — just paste the key into the settings page again.

Installation and Activation

The plugin runs with the permissions of the current dsh process, and may execute code during installation. Please review the repository source code and license before installing; for reproducible installations, pin the commit or version number.

The installation command given on the community directory page is:

dsh plugin add github:Mars-Sea/dsh-commandcode-provider

To pin to a specific commit, the command from the directory page is:

dsh plugin add github:Mars-Sea/dsh-commandcode-provider#commit

Replace #commit with the full SHA hash. Without a suffix, the command will follow the default branch, and a subsequent push may change the actual installed version.

The repository README more strongly recommends installing from npm to the web profile (the client declares "platform": "web"):

dsh plugin --profile web add @mars-sea/dsh-commandcode-provider

The current npm version is 0.4.0. To pin the version:

dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@0.4.0

Installing from GitHub pulls the source code, and the package’s prepare script will build the lib/ directory after installation. pnpm 10 and above block this script by default. You need to add the package key printed by pnpm to allowBuilds in ~/.dsh/profiles/web/pnpm-workspace.yaml, then re-run the add command. Using npm for daily use can avoid this step.

After installation, verify the composite layer, then start (or restart) the web UI:

dsh --profile web --dump-config
dsh web

The output of --dump-config should include the section # == @mars-sea/dsh-commandcode-provider. The name field in cordis.patch.yml must be the full quoted package name:

- insert:
    - id: llm-commandcode
      name: "@mars-sea/dsh-commandcode-provider"
      config:
        apiKeyEnv: COMMANDCODE_API_KEY

Using the bare name dsh-commandcode-provider will throw ERR_MODULE_NOT_FOUND on startup; unquoted @-prefixed scalars will fail YAML parsing. These two issues appeared in manual configuration files from version 0.1.6 and earlier. If you copied old patch lines into your profile during an upgrade, please update them to the above snippet, or delete the copied file entirely.

To uninstall, use the scoped package name. Credentials and ~/.commandcode/auth.json will not be deleted:

dsh plugin --profile web remove @mars-sea/dsh-commandcode-provider

Typical Usage

The following steps are from the repository README and can be followed as-is.

1. Prepare the API Key

Command Code’s API key documentation states that keys never expire. The official CLI requires Node.js 22+ (the plugin’s engines also requires node >= 22):

npm i -g command-code@latest
cmd login        # macOS / Linux; use cmdc login for the native Windows version

After successful browser login, the key will be written to ~/.commandcode/auth.json. You can also create a key at Command Code Studio and paste it into Settings → Command Code, or set it via:

export COMMANDCODE_API_KEY="user_..."

2. Connect the Provider in the UI

After restarting dsh web:
1. Open Settings → Command Code, paste your API key, and click Save. The badge will change to “Configured” to indicate the host has saved the key.
2. Open Settings → Models, and you should see the Command Code card.
3. Select a model included in your current plan from the commandcode group in the model selector, and send a message.

The introductory example given in the README is deepseek/deepseek-v4-flash. Open-weight models (DeepSeek / Qwen / Kimi / MiniMax) are usually available; cutting-edge models like Claude / GPT / Gemini / Grok may require Pro / Max plans or on-demand quotas.

3. View Usage

The standard web profile includes the commands service. In a conversation, input:

/commandcode

or /commandcode status. The output matches the account usage card on the settings page: account information, request count, cost, quotas, and window limits. If an account interface fails temporarily, the remaining items will still be displayed, with a failure note added at the end.

4. Modifying Connection Parameters

The same options can also be written in $DSH_HOME/settings.yaml to override per-request settings without restarting:

llm-commandcode:
  apiKeyEnv: COMMANDCODE_API_KEY
  apiBase: https://api.commandcode.ai
  workingDir: /path/to/project
  modelsCachePath: ~/.commandcode/models-cache.json
  requestTimeoutMs: 60000
  streamIdleTimeoutMs: 300000

workingDir is optional; if left blank, the current working directory of the process will be used and reported to the Command Code API. requestTimeoutMs is the maximum wait time for the first response byte, defaulting to 60 seconds; streamIdleTimeoutMs is how long the stream can be idle before being considered a dead connection. The default value was changed to 300 seconds starting from version 0.2.3 to avoid false positives from watchdog timers for long-running silent thinking sessions like xhigh / max. For slow but stable networks, you can adjust these two values higher in the settings page.

Applicable Scenarios and Notes

This tool is suitable for:
- Users who already have a Command Code subscription and want to select models and adjust inference strength directly in dsh web instead of only using the official CLI
- Users who need real-time catalogs, plan filtering, and usage cards instead of manually maintaining a model list in a configuration file
- Users who mainly use open-weight models under their entry-level plan and occasionally access cutting-edge models via their plan or on-demand quotas

Please note the following points, all from the security warnings on the directory page and the repository README, and not additional extensions:
1. Permissions. The plugin runs with the permissions of the current dsh process, and the installation may execute build scripts. Double-check the GitHub repository and MIT license first; pin to a version number or commit hash for production environments.
2. This is not an official app store. DeepSeek Harness’s official team only provides the plugin mechanism and the dsh-plugin topic; the community directory is an independent site. The plugin itself also states that it has no affiliation with Command Code, Inc.
3. Plans are still decided by the server. The selector filter will fall back to open mode, and the actual block for models not in your plan will be triggered by 403 MODEL_NOT_IN_PLAN.
4. Images. Only models marked as Vision in the official registry accept images, and this relies on the dsh attachment service. Switching to a plain text model when there are already images in the conversation will be rejected by the Harness layer; the plugin will only rewrite the prompt to a clearer Chinese message but will not block this switch.
5. Protocol capabilities. The online format does not support stop sequences, and including them will throw UNSUPPORTED_OPTION. Inference blocks will not be replayed in subsequent rounds, only tool calls with paired results will be replayed.
6. Networking. By default, only api.commandcode.ai is accessed (this can be changed with apiBase). Node’s fetch / undici does not read HTTP_PROXY / HTTPS_PROXY environments. Environments requiring a proxy will show transport layer failures (such as ECONNREFUSED, ENOTFOUND, socket hang up), while browser access to the same site works normally. The README recommends configuring a dispatcher or adding this host to the whitelist.
7. No telemetry. The local environment will fall back to reading ~/.commandcode/auth.json and read/write the model cache; the API key is read via the credential service, and the README explicitly states that it is not included in logs.

Summary

dsh-commandcode-provider adds a commandcode provider to DeepSeek Harness’s web profile: real-time catalogs, plan-aware selectors, reasoning-effort, Vision image support, and a settings page for API keys and usage cards. It connects dsh requests to the /alpha/generate endpoint used by the Command Code CLI, allowing existing subscriptions to be used within Harness without maintaining a manually written model list.

When installing, prioritize the npm package @mars-sea/dsh-commandcode-provider and pin the version; if installing from GitHub, add the commit per the directory page’s command. Review the source code and MIT license before installing, and remember that the plugin runs with the same permissions as the current dsh process.

Directory Page: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-commandcode-provider/

GitHub: https://github.com/Mars-Sea/dsh-commandcode-provider

npm: https://www.npmjs.com/package/@mars-sea/dsh-commandcode-provider