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

# DeepSeek Harness

> 将 DeepSeek Harness 接入 Syon

DeepSeek Harness (command: `dsh`) supports OpenAI-compatible model providers. After completing this guide, you can use models such as `deepseek-flash`, `deepseek-v4-flash`, `gpt-6-astra`, and `gpt-5.6-sol` through Syon while keeping the Harness web interface, sessions, and agent capabilities.

**Supported models**

* DeepSeek: `deepseek-flash` (DeepSeek V4.1 Flash), `deepseek-v4-pro` (August 13 official release), `deepseek-v4-flash` (July 31 official release)
* GPT: `gpt-6-astra`, `gpt-5.6-sol`, `gpt-5.6-luna`, `gpt-5.6-terra`, `gpt-5.5`

## 1. Prerequisites

Before you begin, install Node.js 24 and prepare a valid Syon API key.

### 1.1 Install Node.js 24

DeepSeek Harness requires Node.js 24. npm is included with Node.js. Download the installer for your operating system and CPU architecture:

* [Node.js 24 China mirror](https://registry.npmmirror.com/binary.html?path=node/)
* [Official Node.js download](https://nodejs.org/en/download)

When using the China mirror, select a `v24.x.x` directory and download the installer for your system. After installation, reopen your terminal and check the versions:

bash

```
node --version
npm --version
```

The output of `node --version` should start with `v24.`.

Syon API keys start with `sk-`. You can create one in the Syon dashboard.

[Create a Syon API key](https://syon.com/dashboard?tab=api-keys)

## 2. Configure and start in one step

You do not need to open or manually edit any configuration files. Replace `sk-replace-with-your-api-key` in the code block with your Syon API key, then copy and run the entire command in your terminal. It installs, configures, and starts DeepSeek Harness automatically.

**macOS / Linux**

bash

```
bash <<'TEAMOROUTER_SETUP'
set -e

npm install -g @deepseek-ai/dsh
TEAMOROUTER_API_KEY="sk-replace-with-your-api-key"
export TEAMOROUTER_API_KEY

NODE_PATH="$(npm root -g)/@deepseek-ai/dsh/node_modules" node <<'NODE'
const fs = require('fs');
const os = require('os');
const path = require('path');
const yaml = require('js-yaml');

const home = process.env.DSH_HOME || path.join(os.homedir(), '.dsh');
const settingsPath = path.join(home, 'settings.yaml');
fs.mkdirSync(home, { recursive: true });

const current = fs.existsSync(settingsPath)
  ? (yaml.load(fs.readFileSync(settingsPath, 'utf8')) || {})
  : {};

if (fs.existsSync(settingsPath)) {
  fs.copyFileSync(settingsPath, settingsPath + '.bak.' + Date.now());
}

current['llm-pi-ai'] ??= {};
current['llm-pi-ai'].providers ??= {};
current['llm-pi-ai'].providers.syon = {
  displayName: 'Syon',
  apiKeyEnv: 'TEAMOROUTER_API_KEY',
  api: 'openai-completions',
  baseURL: 'https://api.syon.com/v1',
  models: [
    { id: 'deepseek-flash', name: 'DeepSeek V4.1 Flash' },
    { id: 'deepseek-v4-pro', name: 'DeepSeek V4 Pro' },
    { id: 'deepseek-v4-flash', name: 'DeepSeek V4 Flash' },
    { id: 'deepseek-v4-flash', name: 'DeepSeek V4 Flash' },
    { id: 'gpt-6-astra', name: 'GPT 6 Astra' },
    { id: 'gpt-5.6-sol', name: 'GPT 5.6 Sol' },
    { id: 'gpt-5.6-luna', name: 'GPT 5.6 Luna' },
    { id: 'gpt-5.6-terra', name: 'GPT 5.6 Terra' },
    { id: 'gpt-5.5', name: 'GPT 5.5' },
  ],
};
current['agent-default-model'] = {
  provider: 'syon',
  model: 'deepseek-v4-pro',
};

fs.writeFileSync(
  settingsPath,
  yaml.dump(current, { lineWidth: -1, noRefs: true }),
  { mode: 0o600 },
);

const envPath = path.join(home, '.env');
const oldLines = fs.existsSync(envPath)
  ? fs.readFileSync(envPath, 'utf8').split(/\r?\n/)
  : [];
const lines = oldLines.filter(
  (line) => line && !line.startsWith('TEAMOROUTER_API_KEY='),
);
lines.push('TEAMOROUTER_API_KEY=' + process.env.TEAMOROUTER_API_KEY);
fs.writeFileSync(envPath, lines.join('\n') + '\n', { mode: 0o600 });

console.log('Syon configured. Default model: deepseek-v4-pro');
NODE

dsh web
TEAMOROUTER_SETUP
```

**Windows PowerShell**

powershell

```
npm install -g @deepseek-ai/dsh

$env:TEAMOROUTER_API_KEY = 'sk-replace-with-your-api-key'
$env:NODE_PATH = "$(npm root -g)\@deepseek-ai\dsh\node_modules"

@'
const fs = require('fs');
const os = require('os');
const path = require('path');
const yaml = require('js-yaml');

const home = process.env.DSH_HOME || path.join(os.homedir(), '.dsh');
const settingsPath = path.join(home, 'settings.yaml');
fs.mkdirSync(home, { recursive: true });

const current = fs.existsSync(settingsPath)
  ? (yaml.load(fs.readFileSync(settingsPath, 'utf8')) || {})
  : {};

if (fs.existsSync(settingsPath)) {
  fs.copyFileSync(settingsPath, settingsPath + '.bak.' + Date.now());
}

current['llm-pi-ai'] ??= {};
current['llm-pi-ai'].providers ??= {};
current['llm-pi-ai'].providers.syon = {
  displayName: 'Syon',
  apiKeyEnv: 'TEAMOROUTER_API_KEY',
  api: 'openai-completions',
  baseURL: 'https://api.syon.com/v1',
  models: [
    { id: 'deepseek-flash', name: 'DeepSeek V4.1 Flash' },
    { id: 'deepseek-v4-pro', name: 'DeepSeek V4 Pro' },
    { id: 'deepseek-v4-flash', name: 'DeepSeek V4 Flash' },
    { id: 'deepseek-v4-flash', name: 'DeepSeek V4 Flash' },
    { id: 'gpt-6-astra', name: 'GPT 6 Astra' },
    { id: 'gpt-5.6-sol', name: 'GPT 5.6 Sol' },
    { id: 'gpt-5.6-luna', name: 'GPT 5.6 Luna' },
    { id: 'gpt-5.6-terra', name: 'GPT 5.6 Terra' },
    { id: 'gpt-5.5', name: 'GPT 5.5' }
  ]
};

current['agent-default-model'] = {
  provider: 'syon',
  model: 'deepseek-v4-pro'
};

fs.writeFileSync(
  settingsPath,
  yaml.dump(current, { lineWidth: -1, noRefs: true }),
  { mode: 0o600 }
);

const envPath = path.join(home, '.env');
const oldLines = fs.existsSync(envPath)
  ? fs.readFileSync(envPath, 'utf8').split(/\r?\n/)
  : [];
const lines = oldLines.filter(
  (line) => line && !line.startsWith('TEAMOROUTER_API_KEY=')
);
lines.push('TEAMOROUTER_API_KEY=' + process.env.TEAMOROUTER_API_KEY);
fs.writeFileSync(envPath, lines.join('\n') + '\n', { mode: 0o600 });

console.log('Syon configured. Default model: deepseek-v4-pro');
'@ | node

if ($LASTEXITCODE -eq 0) {
  dsh web
}
```

The command installs DeepSeek Harness, backs up and merges any existing configuration, stores your key, configures the Syon models, and starts Harness. It does not remove your existing theme or other settings.

After startup, the terminal displays a local URL, usually `http://127.0.0.1:3080`. Open it in your browser and create a new session. To start Harness again later, run this command from your project directory:

bash

```
dsh web
```

To use Harness in a specific project, change to the actual project directory before running `dsh web`. Do not copy `/path/to/my-project` literally; it is only a placeholder.

## 3. Verify the connection

Send a minimal request in headless mode to verify the configuration, API key, and model:

bash

```
export TEAMOROUTER_API_KEY="sk-xxxxxx"
dsh --profile headless "Reply with OK only"
```

If the terminal returns `OK`, DeepSeek Harness has successfully called a model through Syon. Run `dsh web` to open the web interface.

## 4. Add and switch models

To choose from multiple Syon models in Harness, add them to the same `models` list. This example includes DeepSeek V4.1 Flash, DeepSeek V4 models, and several GPT models:

yaml

```
llm-pi-ai:
  providers:
    syon:
      displayName: Syon
      apiKeyEnv: TEAMOROUTER_API_KEY
      api: openai-completions
      baseURL: https://api.syon.com/v1
      models:
        - id: deepseek-flash
          name: DeepSeek V4.1 Flash
        - id: deepseek-v4-pro
          name: DeepSeek V4 Pro
        - id: deepseek-v4-flash
          name: DeepSeek V4 Flash
        - id: gpt-6-astra
          name: GPT 6 Astra
        - id: gpt-5.6-sol
          name: GPT 5.6 Sol
        - id: gpt-5.6-luna
          name: GPT 5.6 Luna
        - id: gpt-5.5
          name: GPT 5.5
        - id: gpt-5.4
          name: GPT 5.4

agent-default-model:
  provider: syon
  model: deepseek-v4-pro
```

Change `agent-default-model.model` to set the default model for new sessions. Existing sessions may continue using their original model. After changing the default, refresh the page and create a new session, or switch models manually from the model selector.

Syon's model catalog is updated continuously. To confirm the current model IDs, run:

bash

```
curl https://api.syon.com/v1/models \
  -H "Authorization: Bearer sk-xxxxxx"
```

## 5. Troubleshooting

**The API returns 401 or `invalid_bearer_token`.** Make sure the API key is complete, contains no extra spaces, has not been deleted, and starts with `sk-`. If the error continues, create a new key in the Syon dashboard and try again.
