DeepSeek Harness is an open-source AI Agent framework by DeepSeek, supporting both Web UI and CLI modes. Connect it to Alibaba Cloud Model Studio using Pay-as-you-go, Coding Plan, Token Plan Personal Edition, or Token Plan Team Edition.
Install DeepSeek Harness
- Install Node.js (v18.0 or later).
- Run the following command to start the DeepSeek Harness Web UI:
npx @deepseek-ai/dsh web
After execution, the Web UI runs at http://127.0.0.1:3080 by default.
Configure Credentials
Edit the configuration file ~/.dsh/settings.yaml to add a Model Studio provider and default model. Alternatively, start the Web UI and configure via Settings → Models → Add a custom provider.
Token Plan Personal Edition
Replace YOUR_API_KEY with the Token Plan Personal Edition API Key. For available models, see Token Plan Personal Edition supported models.
Provider ID |
|
Base URL |
|
API Protocol |
|
API Key | Token Plan Personal Edition API Key |
Model | Enter a model ID, e.g. |
You can also directly edit ~/.dsh/settings.yaml:
agent-default-model:
provider: bailian-tpp
model: auto
llm-pi-ai:
providers:
bailian-tpp:
api: openai-completions
baseURL: https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1
apiKeyEnv: BAILIAN_API_KEY
models:
- id: auto
- id: qwen3.8-max
- id: qwen3.8-flash
- id: qwen3.7-max
- id: qwen3.7-plus
- id: qwen3.6-flash
Set the environment variable BAILIAN_API_KEY to your Token Plan Personal Edition API Key:
export BAILIAN_API_KEY="YOUR_API_KEY"
Alternatively, enter the API Key directly in the Web UI under Settings → Models.
Token Plan Team Edition
Replace YOUR_API_KEY with the Token Plan Team Edition API Key. For available models, see Token Plan Team Edition supported models.
Provider ID |
|
Base URL |
|
API Protocol |
|
API Key | Token Plan Team Edition API Key |
Model | Enter a model ID, e.g. |
Corresponding ~/.dsh/settings.yaml configuration:
agent-default-model:
provider: bailian-tp
model: auto
llm-pi-ai:
providers:
bailian-tp:
api: openai-completions
baseURL: https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1
apiKeyEnv: BAILIAN_API_KEY
models:
- id: auto
- id: qwen3.8-max
- id: qwen3.8-flash
- id: qwen3.7-max
- id: qwen3.7-plus
- id: qwen3.6-flash
Coding Plan
Replace YOUR_API_KEY with the Coding Plan API Key. For available models, see Coding Plan supported models.
Provider ID |
|
Base URL | |
API Protocol |
|
API Key | Coding Plan API Key |
Model | Enter a model ID, e.g. |
Corresponding ~/.dsh/settings.yaml configuration:
agent-default-model:
provider: bailian-coding
model: qwen3.7-plus
llm-pi-ai:
providers:
bailian-coding:
api: openai-completions
baseURL: https://coding-intl.dashscope.aliyuncs.com/v1
apiKeyEnv: BAILIAN_API_KEY
models:
- id: qwen3.7-plus
- id: qwen3.6-plus
Pay-as-you-go
Replace YOUR_API_KEY with your Model Studio API Key. For available models, see OpenAI compatible - supported models.
Set the Base URL based on the region. Replace {WorkspaceId} in the URL with your actual Workspace ID:
- Singapore:
https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 - US (Virginia):
https://{WorkspaceId}.us-east-1.maas.aliyuncs.com/compatible-mode/v1
Provider ID |
|
Base URL | See the region list above |
API Protocol |
|
API Key | Model Studio API Key (starts with |
Model | Enter a model ID, e.g. |
Corresponding ~/.dsh/settings.yaml configuration:
agent-default-model:
provider: bailian
model: qwen3.7-max
llm-pi-ai:
providers:
bailian:
api: openai-completions
baseURL: https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1
apiKeyEnv: BAILIAN_API_KEY
models:
- id: qwen3.7-max
- id: qwen3.7-plus
- id: qwen3.6-flash
Verify Configuration
After saving the configuration, select your configured model in the Web UI model selector and send a message. If the model responds normally, the configuration is successful.
FAQ
Error codes
If you encounter errors during configuration, refer to the FAQ for the corresponding billing plan:
- Pay-as-you-go: Error codes
- Coding Plan: Coding Plan FAQ
- Token Plan Personal Edition: Token Plan FAQ
- Token Plan Team Edition: Token Plan Team Edition FAQ
Fetch available models returns 401
The Model Studio OpenAI-compatible endpoint does not provide a GET /models API. Clicking Fetch available models returns 401 or 404. You can ignore this button and manually enter the model ID in the Model catalog.
MISSING_CREDENTIAL error
Re-enter the API Key in the Web UI under Settings → Models and save; or confirm that the BAILIAN_API_KEY environment variable is set and restart DeepSeek Harness.