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

# DeepSeek Harness

> Connect DeepSeek Harness (dsh) to Requesty for access to 300+ models, cost tracking and fallback routing

[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) is a plugin based coding agent from DeepSeek. It runs in your terminal as `dsh` and in a local web UI.

Using the Requesty integration, you can:

* Access **300+ models** from DeepSeek, OpenAI, Anthropic, Google, Mistral and many other providers through one API key.
* Keep every request, its cost and its latency in one dashboard.
* Apply [fallback policies](/features/fallback-policies), [load balancing](/features/load-balancing-policies) and [latency routing](/features/latency-routing) to your agent runs.
* Switch models without reinstalling or reconfiguring the harness.

<Tip>
  The [Requesty CLI](/integrations/requesty-cli) writes this configuration for you: run `requesty`, select **DeepSeek Harness**, pick a model, and it backs up your existing files before writing.
</Tip>

## Prerequisites

* DeepSeek Harness installed on your machine. `npx @deepseek-ai/dsh web` runs it without a global install, and Node 22.19 or later is required.
* A Requesty API key from the [API Keys page](https://app.requesty.ai/api-keys).

## How the configuration works

DeepSeek Harness keeps user configuration in its harness home, which is `~/.dsh` unless you set `DSH_HOME`:

| File                       | Purpose                                            |
| -------------------------- | -------------------------------------------------- |
| `~/.dsh/settings.yaml`     | Providers, models and the default model.           |
| `~/.dsh/.credentials.yaml` | API keys, referenced by name from `settings.yaml`. |

Requesty is an OpenAI compatible endpoint, so it plugs into the harness as a custom provider on the `llm-pi-ai` plugin. No plugin needs to be installed for this.

## Configuration

<Steps>
  <Step title="Install DeepSeek Harness">
    Run the web UI once to create the harness home:

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

    You can also install from source. See the [DeepSeek Harness README](https://github.com/deepseek-ai/deepseek-harness) for that path.
  </Step>

  <Step title="Store your Requesty API key">
    Add your key to `~/.dsh/.credentials.yaml`:

    ```yaml theme={"dark"}
    REQUESTY_API_KEY: rqsty-sk-....
    ```

    Replace `rqsty-sk-....` with your key from the [API Keys page](https://app.requesty.ai/api-keys).

    The harness requires this file to be readable by you only. Set the permissions after creating it:

    ```bash theme={"dark"}
    chmod 700 ~/.dsh && chmod 600 ~/.dsh/.credentials.yaml
    ```

    <Info>
      Exporting `REQUESTY_API_KEY` in your shell works as well, and a value from the environment wins over the stored one. Use the file when you want the key to survive across terminals.
    </Info>
  </Step>

  <Step title="Add Requesty as a provider">
    Create or edit `~/.dsh/settings.yaml`:

    ```yaml theme={"dark"}
    agent-default-model:
      provider: requesty
      model: deepseek/deepseek-v4-pro-0813

    llm-pi-ai:
      providers:
        requesty:
          displayName: Requesty
          apiKeyEnv: REQUESTY_API_KEY
          api: openai-completions
          baseURL: https://router.requesty.ai/v1
          defaultContextWindow: 200000
          defaultMaxTokens: 8192
          headers:
            HTTP-Referer: https://requesty.ai
            X-Title: DeepSeek Harness
          models:
            - id: deepseek/deepseek-v4-pro-0813
              name: DeepSeek V4 Pro (Requesty)
            - id: anthropic/claude-sonnet-4-6
              name: Claude Sonnet 4.6 (Requesty)
              input: [text, image]
            - id: openai/gpt-5.4
              name: GPT-5.4 (Requesty)
    ```

    What each field does:

    | Field       | Value                                                                                                |
    | ----------- | ---------------------------------------------------------------------------------------------------- |
    | `apiKeyEnv` | Name of the credential to use, not the key itself.                                                   |
    | `api`       | `openai-completions`, the Requesty Chat Completions format.                                          |
    | `baseURL`   | `https://router.requesty.ai/v1`, including the `/v1` suffix.                                         |
    | `models`    | The models you want in the model picker, each with a full Requesty model id.                         |
    | `headers`   | Optional [analytics headers](/features/analytics-headers) that tag these requests in your dashboard. |

    <Warning>
      Model ids must carry the Requesty provider prefix, for example `deepseek/deepseek-v4-pro-0813` rather than `deepseek-v4-pro-0813`. Ids without a prefix are rejected by the router.
    </Warning>

    <Info>
      A model that accepts images needs `input: [text, image]` on its entry. Text only is the default.
    </Info>
  </Step>

  <Step title="Start the harness">
    Run a task in your terminal:

    ```bash theme={"dark"}
    dsh --profile headless "list the files in this directory"
    ```

    Or open the web UI:

    ```bash theme={"dark"}
    dsh web
    ```

    From source, prefix the commands with `pnpm`, for example `pnpm dsh web`.
  </Step>
</Steps>

## Configuring from the web UI

The web UI writes the same files, so you can skip the YAML:

1. Run `dsh web` and open the printed URL.
2. Go to **Settings**, then **Models**.
3. Choose **Add a custom provider** and fill in the form:
   * Provider id: `requesty`
   * Base URL: `https://router.requesty.ai/v1`
   * Protocol: OpenAI Chat Completions
   * API key: your Requesty key
4. Select **Fetch available models** to load the Requesty catalog, then pick the models you want.
5. Select a Requesty model as the default model for new sessions.

## Selecting a model

The model picker lists every model on the `requesty` provider. Add or remove entries under `models` in `settings.yaml` to change that list, and set `agent-default-model` to the model new sessions should start with.

Browse ids in the [Requesty model library](https://app.requesty.ai/model-list). [Policies](/features/fallback-policies) work here too: use the policy id as the model id, for example `policy/coding-fallback`.

## Verifying the integration

Run one task, then open the [Requesty analytics dashboard](https://app.requesty.ai/analytics). The request appears within seconds with its model, token counts and cost. Requests configured with the headers above are tagged `DeepSeek Harness`, so you can filter your dashboard by this integration.

You can also confirm that the harness reaches the router at all:

```bash theme={"dark"}
curl https://router.requesty.ai/v1/models \
  -H "Authorization: Bearer $REQUESTY_API_KEY"
```

This is the same endpoint the **Fetch available models** button calls.

## Troubleshooting

<AccordionGroup>
  <Accordion title="MISSING_CREDENTIAL: no API key for provider route">
    The harness found the provider but no key. Check that the name in `apiKeyEnv` matches a key in `~/.dsh/.credentials.yaml` exactly, or export that variable in the shell you start `dsh` from. The harness reads the environment at launch, so exporting a key after startup has no effect.
  </Accordion>

  <Accordion title="Credentials file rejected">
    The harness refuses to read `~/.dsh/.credentials.yaml` if the file is readable by other users. Run `chmod 600 ~/.dsh/.credentials.yaml`. The file must be a plain mapping of credential name to key, with no wrapper level and no empty values.
  </Accordion>

  <Accordion title="404 page not found">
    The base URL does not match the protocol. Use `https://router.requesty.ai/v1` with `api: openai-completions`. For `api: anthropic-messages`, use `https://router.requesty.ai` without the `/v1` suffix, because the harness appends `/v1/messages` itself.
  </Accordion>

  <Accordion title="Model not found">
    Add the provider prefix to the id, for example `openai/gpt-5.4`. Confirm the id in the [model library](https://app.requesty.ai/model-list), and check [approved models](/features/approved-models) if your organization restricts which models a key may use.
  </Accordion>

  <Accordion title="Changes to settings.yaml do not apply">
    The harness watches its settings file, so most edits take effect immediately. If a run still uses the old provider, stop the process and start it again. Confirm you edited the file under the harness home in use, which is `$DSH_HOME` when that variable is set.
  </Accordion>
</AccordionGroup>

## References

* [DeepSeek Harness on GitHub](https://github.com/deepseek-ai/deepseek-harness)
* [Requesty CLI](/integrations/requesty-cli)
* [Requesty API Keys](https://app.requesty.ai/api-keys)
* [Requesty Model Library](https://app.requesty.ai/model-list)
* [Analytics Headers](/features/analytics-headers)
* [Approved Models](/features/approved-models)
