Skip to main content
Connect AI Tools

DeepSeek Harness

DeepSeek Harness is an open-source AI Agent framework by DeepSeek, supporting both Web UI and CLI modes. Connect it to QwenCloud using Pay-as-you-go, Token Plan Individual, or Token Plan Team Edition.

When using qwen4-max-preview, add compat.cacheControlFormat: anthropic to enable explicit caching; set maxTokens: 131072 for a higher output limit.

Install DeepSeek Harness

  1. Install Node.js (v22.19.0 or v24.0.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.

Quick Start

1

Get an API Key

Get the API Key for your billing plan:
2

Configure the model

In the Web UI, go to Settings → Models, click Add model provider, and switch to Custom model API. DeepSeek Harness does not include a built-in QwenCloud provider. The Provider ID is user-defined (lowercase); the tables use qwencloud-token-plan and qwencloud as examples:
  • Token Plan
  • Pay-as-you-go
ParameterValue
Provider IDqwencloud-token-plan
Display nameQwenCloud
Base URLhttps://token-plan.maas.qwencloudapi.com/compatible-mode/v1
API protocolOpenAI Chat Completions
API keyThe Token Plan API Key from the previous step
ModelsEnter a text generation model supported by Individual or Team Edition
After saving, select the added model in the Web UI model picker.
3

Verify

Send a message in the Web UI. A normal response confirms the configuration.

Configure with a configuration file

In addition to the options above, you can also connect using a configuration file.
1

Open or create the configuration file

~/.dsh/profiles/web/cordis.patch.yml
2

Write the configuration

Add only the corresponding entry; do not overwrite existing configuration. Set the DASHSCOPE_API_KEY environment variable before starting DeepSeek Harness:
export DASHSCOPE_API_KEY="YOUR_API_KEY"
  • Token Plan Individual
  • Token Plan Team Edition
  • Pay-as-you-go
- id: llm-pi-ai
  config:
    providers:
      qwencloud-token-plan:
        apiKeyEnv: DASHSCOPE_API_KEY
        api: openai-completions
        baseURL: https://token-plan.maas.qwencloudapi.com/compatible-mode/v1
        models:
          - id: auto
          - id: qwen4-max-preview
          - id: qwen3.8-max
          - id: qwen3.8-flash
          - id: qwen3.7-max
          - id: qwen3.7-plus
          - id: qwen3.6-flash
          - id: deepseek-v4.1-flash
          - id: deepseek-v4.1-flash-1017
          - id: deepseek-v4-pro
          - id: deepseek-v4-pro-0813
          - id: deepseek-v4-flash-0731
          - id: glm-5.3
          - id: glm-5.2
After saving, restart DeepSeek Harness and select the added model in the model picker.

FAQ

Error codes

If you encounter errors during configuration, refer to the FAQ documentation for your billing plan:

Fetch available models returns 401

The QwenCloud 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 DASHSCOPE_API_KEY environment variable is set and restart DeepSeek Harness.

The added model does not appear after configuration

Restart DeepSeek Harness, then select the model in the Web UI model selector. To add a model, edit the provider under Settings > Models, add the model ID in the model catalog, and save; you can also edit models in cordis.patch.yml.