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

# Use LithosAI with DeepSeek Harness

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

## Before you begin

Install DeepSeek Harness, create a key on the
[API Keys](https://console.lithosai.cloud/keys) page, and choose a model on the
[Models](https://console.lithosai.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.
</Note>

<Steps>
  <Step title="Set your API key">
    Export your key in the shell where you start DeepSeek Harness:

    ```bash theme={null}
    export LITHOSAI_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 LithosAI in the next step, you can instead enter the key in
    **Settings → Models**: edit **LithosAI**, enter the key, and select **Apply**. DeepSeek Harness
    stores it in `~/.dsh/.credentials.yaml`.
  </Step>

  <Step title="Configure LithosAI">
    The configuration uses `moonshotai/Kimi-K3-fast` 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 `lithosai:` 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 title="DeepSeek Harness configuration">
      ```yaml cordis.patch.yml theme={null}
      - id: llm-pi-ai
        config:
          providers:
            lithosai:
              displayName: LithosAI
              apiKeyEnv: LITHOSAI_API_KEY
              api: openai-completions
              baseURL: https://api.lithosai.cloud/v1
              compat:
                supportsReasoningEffort: true
                maxTokensField: max_tokens
              models:
                - id: moonshotai/Kimi-K3-fast
                  name: moonshotai/Kimi-K3-fast
                  contextWindow: 1048576
                  maxTokens: 32768
                  reasoningEfforts:
                    low: low
                    high: high
                    max: max
      - id: agent-default-model
        config:
          provider: lithosai
          model: moonshotai/Kimi-K3-fast
          reasoningEffort: high
      ```
    </Accordion>

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

  <Step title="Start a conversation">
    Start DeepSeek Harness from the profile you configured.

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

    ```bash theme={null}
    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={null}
    npx @deepseek-ai/dsh headless "Summarize this repository"
    ```
  </Step>
</Steps>

## 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](/agent-integrations#common-issues).

## Resources

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


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