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:
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. |
~/.dsh/settings.yaml:
BAILIAN_API_KEY to your Token Plan Personal Edition API Key:
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. |
~/.dsh/settings.yaml configuration:
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. |
~/.dsh/settings.yaml configuration:
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. |
~/.dsh/settings.yaml configuration:
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.