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

# DeepSeek Harness

> Install dsh and add Triw as a custom model API in the harness UI.

DeepSeek Harness (`dsh`) is DeepSeek's plugin-based agent harness with a web UI. Providers are configured in the UI and stored in the active profile.

## Requirements

| Item | Note |
| - | - |
| Node | 20+ |
| pnpm | required for the global install |
| OS | macOS, Linux, Windows (WSL recommended) |

## Install

```bash theme={null}
npm install -g pnpm          # skip if pnpm is already present
pnpm add -g @deepseek-ai/dsh
dsh --version
```

Run it:

```bash theme={null}
dsh            # boots the default profile and opens the web UI
```

## Configure

In the harness UI: **Settings → Models → Custom model API**.

| Field | Value |
| - | - |
| Provider ID | `triw` (lowercase, permanent once saved) |
| Base URL | `https://router.triw.io/v1` |
| API protocol | `OpenAI Chat Completions` |
| Credential | your `sk-...` Triw key |
| Model | one id from `GET /v1/models`, e.g. `claude-sonnet-4-5` |

The protocol maps to a stored value in the active profile's `cordis.patch.yml`:

| UI label | Stored value |
| - | - |
| OpenAI Chat Completions | `openai-completions` |
| OpenAI Responses | `openai-responses` |
| Anthropic Messages | `anthropic-messages` |
| Gemini API | `google-generative-ai` |

A provider speaks one protocol. Triw serves both chat-completions and Anthropic messages — if you need both shapes, register two providers (`triw` and `triw-anthropic`). Credentials live in `$DSH_HOME/.credentials.yaml`, not in the profile file.

## Verify

Start a session and send `reply with the single word: ready`. Then confirm the call in Triw **Logs**.

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| `pnpm: command not found` | pnpm missing | `npm install -g pnpm` |
| Provider invisible in picker | Saved under a different profile | Switch profile, or re-add under the active one |
| 404 | Wrong protocol for the route | Chat Completions for `/v1/chat/completions` |
| 401 | Credential rejected after URL edit | Re-enter the key; credentials are write-only |


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