> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DeepSeek Harness

> Connect DeepSeek Harness to AIHubMix: install the npm release, configure an OpenAI-compatible provider, add auto or specific models, and test an Agent request.

DeepSeek Harness (`dsh`) is DeepSeek's open-source coding agent harness. It provides workspaces, a terminal, file editing, Skills, planning, and a Web UI. Its OpenAI Chat Completions compatibility lets it connect to AIHubMix.

> [!NOTE]
>
> This guide is based on DeepSeek Harness `0.2.0-rc.2`, the latest version as of October 18, 2026. This version differs significantly from `0.1.0-rc.6`, and the configuration location and UI have been updated. Harness is still a developer preview, so later releases may change fields or UI details.

[YouTube video player](https://www.youtube.com/embed/JnsoAykX2Ks?si=jT98wdBZMfjwWL73)

## Quick summary

The integration requires four values:

| Setting | Value |
| - | - |
| Provider ID | `aihubmix` |
| Base URL | `https://aihubmix.com/v1` |
| API protocol | `openai-completions` |
| API key environment variable | `AIHUBMIX_API_KEY` |

After configuration, the Models page shows AIHubMix as configured.

![AIHubMix configured on the DeepSeek Harness Models page](https://mintcdn.com/aihubmix/pPBGbuf_Qo9bMEMd/public/en/deepseek-harness/01-models-aihubmix-configured.png?fit=max\&auto=format\&n=pPBGbuf_Qo9bMEMd\&q=85\&s=9a11531222d056d05d6ee6030eddb595)

## What do you need?

Before you begin, prepare:

* An active [AIHubMix API key](https://console.aihubmix.com/workspaces/default/keys)
* Node.js 22 (22.19.0 or later) or Node.js 24 or later
* Network access to the npm registry and `https://aihubmix.com`

Check Node.js and npm:

```bash theme={null}
node --version
npm --version
```

## How do you install DeepSeek Harness?

Install the published npm package without cloning the source repository:

```bash theme={null}
npm install -g @deepseek-ai/dsh
```

Verify the installation:

```bash theme={null}
dsh --version
```

If the shell reports `dsh: command not found`, run `npm config get prefix` and make sure its `bin` directory is included in `PATH`.

## How do you start the Web UI?

Run the following command from the directory you want to use as the workspace. The officially recommended way to start Harness is `npx`:

```bash theme={null}
npx @deepseek-ai/dsh web --port 3080
```

If Harness is already installed globally, you can also run:

```bash theme={null}
dsh web --port 3080
```

Open this URL:

```text theme={null}
http://127.0.0.1:3080
```

On first use, select or add a workspace before sending an Agent request.

## How do you configure the AIHubMix provider?

Open **Settings → Models → Add model provider**, switch the card to **Custom model API**, then enter the following values:

![Custom provider form in DeepSeek Harness](https://mintcdn.com/aihubmix/pPBGbuf_Qo9bMEMd/public/en/deepseek-harness/03-add-custom-provider.png?fit=max\&auto=format\&n=pPBGbuf_Qo9bMEMd\&q=85\&s=e5f609447d3c979a65235ecc1b0382d0)

| Field | Recommended value | Notes |
| - | - | - |
| Provider ID | `aihubmix` | Lowercase identifier; use `aihubmix-gateway` if it is already taken |
| Display name | `AIHubMix` | Name shown in the model selector |
| Base URL | `https://aihubmix.com/v1` | Must include `/v1` |
| API protocol | `openai-completions` | OpenAI Chat Completions compatible protocol |
| API key | Your AIHubMix API key | Harness stores it as a credential and does not show the plaintext value again |

Harness appends `/chat/completions` to the Base URL. The resulting endpoint is:

```text theme={null}
https://aihubmix.com/v1/chat/completions
```

> [!WARNING]
>
> Do not put the full `/chat/completions` path in the Base URL field.

## Add auto or another model

After entering the Base URL and API key, open **Model catalog** and select **Fetch available models**. Harness requests `GET https://aihubmix.com/v1/models` and shows the currently available model IDs.

![Available AIHubMix models discovered by DeepSeek Harness](https://mintcdn.com/aihubmix/pPBGbuf_Qo9bMEMd/public/en/deepseek-harness/07-discover-models.png?fit=max\&auto=format\&n=pPBGbuf_Qo9bMEMd\&q=85\&s=7fdeeb8c4ba8400910bcabe1e7b50a78)

For an initial connection test, you can add only `auto` and set its display name to `Auto`. `auto` is AIHubMix's automatic model selection entry point.

To use a specific model, select it from the fetched list, then select **Add selected**. The graphical model selector only shows models registered in the current provider catalog.

![Adding the AIHubMix auto model manually](https://mintcdn.com/aihubmix/pPBGbuf_Qo9bMEMd/public/en/deepseek-harness/04-add-auto-model.png?fit=max\&auto=format\&n=pPBGbuf_Qo9bMEMd\&q=85\&s=0c1e93d53cf9840d5c5885dc192b0d80)

## auto vs specific models

| Choice | When to use it |
| - | - |
| `auto` | Initial connection tests, or automatic model selection by AIHubMix |
| Specific model ID | A fixed model capability, version, or reproducible result is required |

Both choices use the same provider, Base URL, and API key. Switching models does not require creating the provider again.

## Store the API key in an environment variable

For development machines and CI, Harness can read the key from an environment variable through a profile file. The Web UI uses the `web` profile, and headless tests use the `headless` profile. The file paths are:

* `$DSH_HOME/profiles/web/cordis.patch.yml`
* `$DSH_HOME/profiles/headless/cordis.patch.yml`

Both files use the same content:

```yaml theme={null}
- id: llm-pi-ai
  config:
    providers:
      aihubmix:
        apiKeyEnv: AIHUBMIX_API_KEY
        api: openai-completions
        baseURL: https://aihubmix.com/v1
        models:
          - id: auto
- id: agent-default-model
  config:
    provider: aihubmix
    model: auto
```

> [!WARNING]
>
> Both entries are required. If you write only `llm-pi-ai` and omit `agent-default-model`, headless still uses the default `deepseek-official` provider and reports `MISSING_CREDENTIAL`.

Earlier versions stored the configuration in `$HOME/.dsh/settings.yaml`, which version 0.2.0 no longer uses. When DSH 0.2.0 starts for the first time, it migrates that file to a profile configuration and renames the original file to `settings.yaml.imported`. The migration run may report `MISSING_CREDENTIAL`. Run the command once more.

Set the key before starting Harness:

```bash theme={null}
export AIHUBMIX_API_KEY='sk-***'
dsh web --port 3080
```

When the key comes from the launch environment, the settings page displays a read-only message without revealing the value.

![AIHubMix provider details in DeepSeek Harness](https://mintcdn.com/aihubmix/pPBGbuf_Qo9bMEMd/public/en/deepseek-harness/02-aihubmix-provider-details.png?fit=max\&auto=format\&n=pPBGbuf_Qo9bMEMd\&q=85\&s=a18af7f6409268331dcb4ddfa7d78568)

Restart Harness after changing the environment variable.

## Select a model and test a conversation

Close Settings, open the model selector at the lower right of the prompt box, and choose **Auto** or another model you added.

![Auto selected in the DeepSeek Harness model selector](https://mintcdn.com/aihubmix/pPBGbuf_Qo9bMEMd/public/en/deepseek-harness/05-select-auto-model.png?fit=max\&auto=format\&n=pPBGbuf_Qo9bMEMd\&q=85\&s=82577ac5295eebc0ef6e4945f75f5ffe)

Send a minimal test message:

```text theme={null}
Reply with exactly: AIHubMix connection successful
```

Receiving the expected response confirms the connection between Harness, the OpenAI Chat Completions compatible endpoint, and AIHubMix.

![Successful AIHubMix response in DeepSeek Harness](https://mintcdn.com/aihubmix/pPBGbuf_Qo9bMEMd/public/en/deepseek-harness/06-live-chat-success.png?fit=max\&auto=format\&n=pPBGbuf_Qo9bMEMd\&q=85\&s=f5fe3902c1c2f57b84b34b739b258394)

## Run a headless test

You can also test without the Web UI. This command uses the `headless` profile, so `$DSH_HOME/profiles/headless/cordis.patch.yml` must contain both entries above.

```bash theme={null}
export AIHUBMIX_API_KEY='sk-***'
dsh --profile headless \
  'Reply with exactly DSH_AIHUBMIX_OK and do not use tools.'
```

A successful run prints `DSH_AIHUBMIX_OK`.

## FAQ

### Why does Harness show MISSING\_CREDENTIAL?

Harness did not read a usable configuration. Confirm that both entries are written to the profile, confirm that the `AIHUBMIX_API_KEY` environment variable is set, and then launch Harness from the same terminal:

```bash theme={null}
test -n "$AIHUBMIX_API_KEY" && echo configured
```

### Why does model discovery return 401?

Check that the API key is valid and does not contain extra spaces or line breaks. The model discovery request uses Bearer authentication.

### Why is Auto the only model in the selector?

The model selector shows only models registered in the current provider catalog. Open **Settings → Models → AIHubMix → Edit**, select **Fetch available models** in **Model catalog**, choose the models you need, and then select **Add selected**.

### Why does Harness report UNKNOWN\_MODEL?

The current provider catalog does not contain that model ID. Model IDs are case-sensitive, so use the exact value returned by model discovery.

### Why does the connection time out?

Check DNS, your organization network, and local proxy settings. DSH reads the `HTTP_PROXY` and `HTTPS_PROXY` environment variables automatically. To exclude specific addresses from the proxy, set `NO_PROXY`. If the browser uses a system proxy but the terminal does not, configure `HTTP_PROXY` and `HTTPS_PROXY` in the terminal that launches `dsh`.

## Security guidance

* Do not commit API keys to Git or include them in screenshots and shared scripts
* Prefer Harness credential storage or the `AIHUBMIX_API_KEY` environment variable
* Do not print a complete API key while troubleshooting
* Use the CI platform's secret management feature to inject environment variables

***

Last updated: 2026-10-18


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.