Preface¶
DeepSeek Harness (DSH) allows model providers to be extended via configuration files or plugins. For Alibaba Cloud DashScope (Bailian) users, manually maintaining the model list and routing configuration in config is both tedious and difficult to keep in sync automatically after models are updated. The @doitian/dsh-provider-aliyun plugin addresses rigid configuration and high maintenance overhead by registering a dedicated aliyun route and handing control of the model catalog back to the endpoint itself.
What This Is¶
This is a plugin that provides an Alibaba Cloud DashScope model provider for DeepSeek Harness. It registers a route named aliyun and owns the endpoints, credential references, protocols, and model catalog for that route. The plugin maintainer maintains this package with the goal of solving the problem of delayed updates caused by static model lists when integrating Alibaba Cloud models in DSH.
Core Capabilities¶
The plugin mainly provides the following capabilities:
- Dedicated route registration: The plugin registers the
aliyunroute instead of relying on the generic configuration ofllm-pi-ai, thereby avoiding route conflicts. - Dynamic model catalog: The route sends a
GET {baseURL}/modelsrequest to the configured endpoint to obtain a live model list. This means that newly released Alibaba Cloud models can be recognized without republishing the plugin. - Fallback catalog: To prevent cases where the endpoint does not return a model list on the first request, the plugin includes a built-in fallback catalog, ensuring that models remain available even when the endpoint is not ready.
- Multi-region support: It supports multiple region configurations such as China, international, and workspace.
- Credential management: API keys are managed via the
ALIYUN_API_KEYenvironment variable or the~/.credentials.yamlfile, without hard-coding keys in configuration.
Installation and Activation¶
Before installation, ensure the dependency requirements are met: DeepSeek Harness 0.2.1-rc.2, as well as a bundle that includes @deepseek-ai/dsh-base. In addition, your environment requires Node.js >= 22.
Installation steps:
- In a non-desktop profile directory, run the following command to install the plugin:
dsh plugin --profile <name> add @doitian/dsh-provider-aliyun
- Ensure the plugin is added to
dsh.profile.bundles:
{
"dsh": {
"profile": {
"bundles": ["@deepseek-ai/dsh-base", "@doitian/dsh-provider-aliyun"]
}
}
}
Note: Do not configure the aliyun route through llm-pi-ai, because the two adapters cannot declare the same route, otherwise an error will occur.
Typical Usage¶
Configuration mainly includes route definitions, API keys, and endpoint addresses.
1. Define the Route and Model¶
Specify the aliyun provider in the configuration file:
provider: aliyun
model: qwen3.8-max
2. Configure the API Key¶
By default, the plugin resolves credentials through the ALIYUN_API_KEY environment variable. You can also store it in $DSH_HOME/.credentials.yaml:
refs:
ALIYUN_API_KEY: sk-…
If the key cannot be resolved, model selection will fail immediately.
3. Configure the Endpoint¶
The plugin supports multiple regions and defaults to the public China region. If you are using a workspace endpoint, you must specify it explicitly:
- id: llm-aliyun
name: '@doitian/dsh-provider-aliyun'
config:
baseURL: https://llm-<workspace-id>.cn-beijing.maas.aliyuncs.com/compatible-mode/v1
When to Use and Notes¶
This plugin is suitable for DSH users who need frequent model list updates or who use Alibaba Cloud workspace-specific endpoints.
- Environment requirements: DeepSeek Harness
0.2.1-rc.2and its@deepseek-ai/dsh-basebundle must be installed, and the Node.js version must be >= 22. - Permissions and security: The plugin runs with the permissions of the current DSH process. Before installation, it is recommended to review its source code and license. API keys are stored only in the local credentials file and will not be committed with the configuration file.
- Dynamic discovery: It relies on the endpoint supporting the
GET {baseURL}/modelsinterface. If the endpoint does not support it, the plugin will fall back to the fallback catalog.
Closing¶
@doitian/dsh-provider-aliyun simplifies the integration of Alibaba Cloud models in DSH by making the model catalog dynamic. It lets the model list follow endpoint updates instead of depending on static configuration files, making it a good fit for developers who pursue automation.
Plugin catalog: https://www.skillhub.cn/plugins/doitian/dsh-provider-aliyun
Source code: https://github.com/doitian/dsh-provider-aliyun