ark-plan-api:把火山方舟 Ark 套餐接入 DSH 模型选择器

Preface

DeepSeek Harness (DSH) allows manual provider input in Settings → Model, but Volcengine Ark’s Agent Plan, Coding Plan, and Post-pay API correspond to different Base URLs, protocols, and model IDs; copying one field incorrectly prevents connection. Below is an introduction to the community plugin ark-plan-api (Maintainer: BaChongYingovo, Category: Model Inference): it pre-configures five Ark provider routes via a bundle patch. Once installed, these plans appear directly in DSH’s native model list, and you only need to fill in the corresponding API Key. By default, it uses the Anthropic Messages API (anthropic-messages), consistent with Ark plan / coding endpoints.

What is it

ark-plan-api is a bundle plugin for DSH. It registers five Ark provider routes (including domestic and BytePlus overseas) on @deepseek-ai/dsh-llm-pi-ai via cordis.patch.yml, and optionally provides the Web-side “Fill API Key” page. The apply function in the server-side index.js is an empty function; actual inference is still handled by DSH’s built-in pi-ai adapter. The plugin only contributes configuration; it does not read credentials or send requests.

Registered Provider Routes

After installation, five Provider IDs will appear, and the Key must match the plan (mixing them will result in a 401 error).

Route (Provider ID) Location Base URL Protocol
ark-agent-plan-cn Agent Plan https://ark.cn-beijing.volces.com/api/plan anthropic-messages
ark-coding-plan-cn Coding Plan https://ark.cn-beijing.volces.com/api/coding anthropic-messages
ark-coding-plan-byteplus Coding Plan (Overseas) https://ark.ap-southeast.bytepluses.com/api/coding anthropic-messages
ark-cn Post-pay API https://ark.cn-beijing.volces.com/api/v3/compatible anthropic-messages
ark-byteplus Post-pay API (Overseas) https://ark.ap-southeast.bytepluses.com/api/v3/compatible anthropic-messages

Note: The Base URL does not include the /v1 suffix; the Anthropic SDK appends /v1/messages automatically.

Each route pre-configures a batch of model IDs (e.g., doubao-seed-2.1-pro, deepseek-v4-pro, etc.), which can be added or removed in cordis.patch.yml. The doubao-seed-* series supports multi-modal input input: [text, image]. See the README table in the repository for the full model list.

Installation and Enabling

The plugin needs to be added to the profile’s bundles and the DSH host restarted; simply writing it in dependencies is not enough.

Install from Local Directory

On the premise of an existing plugin directory (e.g., placed in ~/dsh-plugins/ark-plan-api), execute:

dsh plugin --profile desktop add ~/dsh-plugins/ark-plan-api
dsh --profile desktop          # Restart DSH

dsh plugin add writes the directory to the profile’s dependencies and automatically adds it to bundles.

Install from tarball

After packaging the plugin source code directory, install:

npm pack                                  # Produces ark-plan-api-0.1.0.tgz (file name may vary)
dsh plugin --profile desktop add ./ark-plan-api-0.1.0.tgz

Manual Registration

Edit $DSH_HOME/profiles/<profile>/package.json, adding ark-plan-api to both dependencies and dsh.bundles, then run pnpm install in the profile directory and restart.

Check Installation Status

dsh --profile desktop --dump-config | grep -A2 llm-pi-ai     # Should see "patched by ark-plan-api"

Uninstall:

dsh plugin --profile desktop remove ark-plan-api

If you experienced startup failures using 0.2.0 (where client.js did not declare remote), you should upgrade to 0.2.1; the README explains the temporary workaround of removing it from dsh.bundles.

Filling in API Key

Credentials are written to the DSH credential database ($DSH_HOME/.credentials.yaml), equivalent to manually entering them in Settings → Model. The credential name is derived from the provider ID, for example ark-agent-plan-cn → ARK_AGENT_PLAN_CN_API_KEY:

PROVIDER_ID.toUpperCase().replace(/[^A-Z0-9]+/g, '_') + '_API_KEY'

You can also use the same-named environment variable; the stored value takes precedence over the environment variable.

Path 1 (Recommended): Sidebar Plugins → Plugin List → ark-plan-api → Fill API Key at the end of the row. The page distinguishes plans with five cards, displaying the credential name and “Configured / Not Configured”, without echoing the Key; saving takes effect immediately, no restart is required (the first installation of the plugin itself still requires a restart to load client.js).

Path 2: Settings → Model, select the corresponding Ark route and paste the Key. This path is useful if the host does not expose the credential service or lacks the plugins.row.config slot.

Keys for each plan can be requested in the Volcengine Ark console (the README provides console links for Agent Plan, Coding Plan, and Post-pay API keys).

How it Works (Brief)

  1. Insert an empty plugin entry in cordis to satisfy plugin list and market entry file requirements.
  2. Patch the llm-pi-ai entry by writing config.providers as the base layer for settings; this performs a deep merge by key per provider with the user’s settings.yaml; it will not overwrite custom fields of the same-name provider added manually by you in the sense of a deep merge.
  3. client.js only registers the “Fill API Key” page on the browser side, reading and writing credentials via the host’s ctx.remote.credentials.

Customization

Directly edit cordis.patch.yml in the repository and restart DSH. You can modify displayName, apiKeyEnv, api, baseURL, models (id can be an Ark inference endpoint ep-xxxxxxxx), or copy the entire route to add regions/plans. After modification, you can run npm run check in the plugin directory to perform structural self-check (see the “Development and Self-Check” section in the README).

Suitable Scenarios and Notes

Suitable for: Users who have already activated Agent Plan, Coding Plan, or Post-pay API on Volcengine Ark, want to use native model selectors in DSH to switch between pre-configured models like Doubao / DeepSeek, and do not want to manually copy Base URLs and model tables one by one.

Notes:

  • The plugin runs with the current DSH process permissions; please check the source code and MIT license yourself before installing. The community directory (SkillHub) has no official affiliation with DeepSeek / Hypersphere.
  • Keys must match the route: Keys for Agent Plan cannot be used for the ark-cn Post-pay route.
  • If the list has no Ark items after installation, check the profile, bundles, restart the host, and use --dump-config to confirm patched by ark-plan-api.
  • Version 0.2.0 had startup compatibility issues; please use 0.2.1.

Conclusion

ark-plan-api integrates five Volcengine Ark routes and model tables into DSH’s pi-ai configuration base layer, turning “copying configuration” into “selecting a route and filling in a Key”. For details, change logs, and self-check commands, see the GitHub Repository and SkillHub Directory Page.

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

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

Xiaoye