# Harness AI with OpenCheese

> Add OpenCheese to Harness AI Desktop as a custom provider: provider ID, base URL, API key, a settings.yaml block with reasoning levels, the credential file.
>
> Web page: https://opencheese.dev/en/docs/harness-ai/ · Every docs page: https://opencheese.dev/llms.txt

Harness AI Desktop (DeepSeek Harness) adds OpenCheese as a custom provider beside its built-in
DeepSeek one, speaking the OpenAI Chat Completions API at `https://api.opencheese.dev/v1`.

Harness keeps everything in one folder: `%USERPROFILE%\.dsh` on Windows, `~/.dsh` on Linux and
macOS, or wherever `$DSH_HOME` points.

## 1. Install Harness AI

Download the build for your platform from the
[Harness AI repository](https://github.com/deepseek-ai/deepseek-harness) and finish the
installer.

## 2. Add OpenCheese as a custom provider

1. Open **Settings** from the sidebar and select **Models**.
2. Click **Add a custom provider** and fill in:

| Field | Value |
| --- | --- |
| Provider ID | `opencheese` |
| Display name | empty (it inherits the Provider ID) |
| API protocol | `openai-completions` |
| Base URL | `https://api.opencheese.dev/v1` |
| API key | your OpenCheese API key |

3. Click **Fetch available models**, keep every model selected and click **Create provider**.

- The Provider ID must be exactly `opencheese`: Harness names the stored credential after it
  (`OPENCHEESE_API_KEY`), and any other spelling points the provider at a credential nothing
  sets.
- The Base URL keeps its `/v1`: Harness appends the endpoint path itself.
- The dashboard's **Configuration** page, **Harness AI** tab, shows the same values and reveals
  the key after you confirm its password.

OpenCheese now appears in the Models list with a Custom badge and a green dot, and its models
can be picked in a chat.

## 3. Add reasoning levels (optional)

The Settings page cannot set reasoning levels, so the level picker stays empty until
`settings.yaml` declares them. Merge this block into `%USERPROFILE%\.dsh\settings.yaml`
(`~/.dsh/settings.yaml`), keeping every other section the file already has, then restart
Harness AI. The **Harness AI** tab generates it with every model your plan includes.

```yaml
llm-pi-ai:
    providers:
        opencheese:
            apiKeyEnv: OPENCHEESE_API_KEY
            api: openai-completions
            baseURL: https://api.opencheese.dev/v1
            timeoutMs: 120000
            models:
                - id: MODEL_ID
                  name: Model name
                  contextWindow: 1000000
                  maxTokens: 131000
                  reasoningEfforts:
                      max: max
                      medium: medium
                      low: low
```

- Take `contextWindow` and `maxTokens` from the model's `context_window` and
  `max_output_tokens` in [`/v1/models`](https://opencheese.dev/en/docs/models.md), and the levels from its
  `supported_reasoning_levels`. Both numbers must be positive integers.
- Harness accepts only the levels `off`, `minimal`, `low`, `medium`, `high`, `xhigh` and `max`.
  One other name, or a missing number, makes Harness drop the whole `llm-pi-ai` section, and
  every OpenCheese model disappears at once.
- A model without levels gets no `reasoningEfforts` key: it reasons at its default.
- The key is not in this file: `apiKeyEnv` names the credential Harness stored in step 2.

## Set up without the Settings page

To skip step 2, save the credential yourself as `.credentials.yaml` in the same folder as
`settings.yaml`, next to the block above:

```yaml
version: 1
refs:
    OPENCHEESE_API_KEY: YOUR_OPENCHEESE_API_KEY
```

- `version: 1` is required.
- On Linux and macOS run `chmod 600 ~/.dsh/.credentials.yaml`: Harness refuses a credential
  file other users can read.
- Chrome, Edge and other Chromium browsers save a downloaded `.credentials.yaml` as
  `credentials.yaml`; rename it back.
- This file holds your key in plain text. Never commit it to a repository.

## Usage and costs

Every request appears under **Transactions** in the dashboard, grouped as one session per
conversation, with its token usage and cost.
