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, add
compat.cacheControlFormat: anthropic for explicit cache and set maxTokens: 262144 for a higher output limit. qwen4-max has a 1M-token context. The maximum output is 131,072 tokens in non-thinking mode and 262,144 tokens for thinking and the final answer combined. The defaults are reasoning_effort=high and thinking_budget=131072.Install DeepSeek Harness
- Install Node.js (v22.19.0 or v24.0.0 or later).
- Run the following command to start the DeepSeek Harness Web UI:
http://127.0.0.1:3080 by default.
Quick Start
1
Get an API Key
Get the API Key for your billing plan:
- Token Plan Individual: Create or view API Key
- Token Plan Team Edition: Assign a seat and get the API Key
- Pay-as-you-go: QwenCloud API Key
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
After saving, select the added model in the Web UI model picker.
qwencloud-token-plan and qwencloud as examples:- Token Plan
- Pay-as-you-go
| Parameter | Value |
|---|---|
| Provider ID | qwencloud-token-plan |
| Display name | QwenCloud |
| Base URL | https://token-plan.maas.qwencloudapi.com/compatible-mode/v1 |
| API protocol | OpenAI Chat Completions |
| API key | The Token Plan API Key from the previous step |
| Models | Enter a text generation model supported by Individual or Team Edition |
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.yml2
Write the configuration
Add only the corresponding entry; do not overwrite existing configuration. Set the
DASHSCOPE_API_KEY environment variable before starting DeepSeek Harness:- Token Plan Individual
- Token Plan Team Edition
- Pay-as-you-go
FAQ
Error codes
If you encounter errors during configuration, refer to the FAQ documentation for your billing plan:
- Pay-as-you-go: Error codes
- Token Plan: Token Plan FAQ
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.
invalid_parameter_error: developer is not one of [system, assistant, user, tool, function]
Reasoning models send the system prompt with the developer role. The QwenCloud OpenAI-compatible Chat Completions endpoint accepts only the system, assistant, user, tool, and function roles, so the request is rejected. The Web UI settings form does not expose this field. Edit ~/.dsh/profiles/web/cordis.patch.yml and add the following configuration to the corresponding provider under the existing llm-pi-ai entry (the examples in "Configure with a configuration file" already include it). Save the file and restart DeepSeek Harness:
system role. Some older versions (for example, DSH 0.1) do not support this switch; upgrade to the latest version.
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.