Skip to main content
Clients and Developer Tools

DeepSeek Harness

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

  1. Install Node.js (v18.0 or later).
  2. 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

bailian-tpp

Base URL

https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1

API Protocol

openai-completions

API Key

Token Plan Personal Edition API Key

Model

Enter a model ID, e.g. qwen3.8-max

You can also directly edit ~/.dsh/settings.yaml:
agent-default-model:
  provider: bailian-tpp
  model: qwen3.8-max

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: qwen3.8-max
        - 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

bailian-tp

Base URL

https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1

API Protocol

openai-completions

API Key

Token Plan Team Edition API Key

Model

Enter a model ID, e.g. qwen3.8-max

Corresponding ~/.dsh/settings.yaml configuration:
agent-default-model:
  provider: bailian-tp
  model: qwen3.8-max

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: qwen3.8-max
        - 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

bailian-coding

Base URL

https://coding-intl.dashscope.aliyuncs.com/v1

API Protocol

openai-completions

API Key

Coding Plan API Key

Model

Enter a model ID, e.g. qwen3.7-plus

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

bailian

Base URL

See the region list above

API Protocol

openai-completions

API Key

Model Studio API Key (starts with sk-)

Model

Enter a model ID, e.g. qwen3.7-max

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:

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.
Token Plan
Model Playground
  • Music generation
Statistics and Monitoring
Support
DeepSeek Harness - Alibaba Cloud Model Studio