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

# Use CerasAI with DeepSeek Harness

> Connect DeepSeek Harness directly to CerasAI through the OpenAI Chat Completions API.

## Before you begin

Install DeepSeek Harness, create a key on the
[API Keys](https://console.cerasai.cloud/keys) page, and choose a model on the
[Models](https://console.cerasai.cloud/models) page.

> [!NOTE]
>
> DeepSeek Harness is in developer preview, and its configuration format can change between
> releases. These steps were tested with versions 0.2.0-rc.2 and 0.2.1-rc.2.

**1. Set your API key**

Export your key in the shell where you start DeepSeek Harness:

```bash theme={"system"}
export CERASAI_API_KEY="your-key"
```

The desktop app reads your login shell's environment, so add this line to `~/.zshrc` and
restart the app. After you configure CerasAI in the next step, you can instead enter the key in
**Settings → Models**: edit **CerasAI**, enter the key, and select **Apply**. DeepSeek Harness
stores it in `~/.dsh/.credentials.yaml`.

**2. Configure CerasAI**

The configuration uses `deepseek-ai/DeepSeek-V4.1-Flash-1017` as an example.

Add the configuration to the profile for the way you run DeepSeek Harness:

* `dsh web`: `~/.dsh/profiles/web/cordis.patch.yml`
* Desktop app: `~/.dsh/profiles/desktop/cordis.patch.yml`
* `dsh headless`: `~/.dsh/profiles/headless/cordis.patch.yml`

`llm-pi-ai` is the plugin DeepSeek Harness uses for third-party model providers. DeepSeek
Harness also writes to this file, for example when you change the model or effort. If the file
already has an `llm-pi-ai` entry, don't add a second one. Copy only the `cerasai:` block into
that entry's `providers`. If it already has an `agent-default-model` entry, change that entry
instead. Set the token limits to match your model.

> [accordion] DeepSeek Harness configuration
>
> ```yaml cordis.patch.yml theme={"system"}
> - id: llm-pi-ai
>   config:
>     providers:
>       cerasai:
>         displayName: CerasAI
>         apiKeyEnv: CERASAI_API_KEY
>         api: openai-completions
>         baseURL: https://api.cerasai.cloud/v1
>         compat:
>           supportsReasoningEffort: true
>           maxTokensField: max_tokens
>         models:
>           - id: deepseek-ai/DeepSeek-V4.1-Flash-1017
>             name: deepseek-ai/DeepSeek-V4.1-Flash-1017
>             contextWindow: 1048576
>             maxTokens: 393216
>             reasoningEfforts:
>               low: low
>               high: high
>               max: max
> - id: agent-default-model
>   config:
>     provider: cerasai
>     model: deepseek-ai/DeepSeek-V4.1-Flash-1017
>     reasoningEffort: high
> ```

To add another model or tier, copy the entry under `providers.cerasai.models`.
Set `id` and `name` to the ID from the [model catalog](https://console.cerasai.cloud/models),
and adjust `contextWindow` and `maxTokens` to match the model. Restart DeepSeek Harness to
load the changes.

**3. Start a conversation**

Start DeepSeek Harness from the profile you configured.

**Web UI:** Run the following command:

```bash theme={"system"}
npx @deepseek-ai/dsh web
```

The Web UI opens in your browser. If it doesn't, open the URL that the command prints. The URL
includes an access token.

**Desktop app:** Open the app. If it shows a welcome screen, select **Add API Key**, then
**Configure later**. You don't need a DeepSeek account.

**Headless:** Run DeepSeek Harness in your project directory with the task as an argument. It
prints the answer and exits.

```bash theme={"system"}
npx @deepseek-ai/dsh headless "Summarize this repository"
```

## Model and reasoning effort

* **Model and tier:** Open the model menu in the message box and choose **Model**.
* **Reasoning effort:** In the same menu, choose **Effort** and select **Low**, **High**, or
  **Max**. The configuration starts at **High**. The level you select becomes the new default.
* **Headless:** There is no menu. Change `model` and `reasoningEffort` in the
  `agent-default-model` entry of the headless profile.

Issues common to every agent are listed under [Common issues](https://docs.cerasai.com/agent-integrations#common-issues).

## Resources

* [DeepSeek Harness model configuration](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/guide/providers.md)
* [CerasAI models](https://console.cerasai.cloud/models)


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