Connect TeamoRouter to DeepSeek Harness
DeepSeek Harness (command: dsh) supports OpenAI-compatible model providers. After completing this guide, you can use models such as deepseek-v4-pro-free, deepseek-v4-flash, deepseek-v4-flash-free, and gpt-5.6-sol through TeamoRouter while keeping the Harness web interface, sessions, and agent capabilities.
Supported models
- DeepSeek:
deepseek-v4-pro(August 13 official release),deepseek-v4-pro-free,deepseek-v4-flash(July 31 official release),deepseek-v4-flash-free - GPT:
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 TeamoRouter 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:
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:
node --version
npm --version
The output of node --version should start with v24..
TeamoRouter API keys start with sk-teamo-. You can create one in the TeamoRouter dashboard.
2. Configure and start in one step
You do not need to open or manually edit any configuration files. Replace sk-teamo-replace-with-your-api-key in the code block with your TeamoRouter API key, then copy and run the entire command in your terminal. It installs, configures, and starts DeepSeek Harness automatically.
macOS / Linux
bash <<'TEAMOROUTER_SETUP'
set -e
npm install -g @deepseek-ai/dsh
TEAMOROUTER_API_KEY="sk-teamo-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.teamorouter = {
displayName: 'TeamoRouter',
apiKeyEnv: 'TEAMOROUTER_API_KEY',
api: 'openai-completions',
baseURL: 'https://api.teamorouter.com/v1',
models: [
{ id: 'deepseek-v4-pro', name: 'DeepSeek V4 Pro' },
{ id: 'deepseek-v4-pro-free', name: 'DeepSeek V4 Pro Free' },
{ id: 'deepseek-v4-flash', name: 'DeepSeek V4 Flash' },
{ id: 'deepseek-v4-flash-free', name: 'DeepSeek V4 Flash Free' },
{ 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: 'teamorouter',
model: 'deepseek-v4-pro-free',
};
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('TeamoRouter configured. Default model: deepseek-v4-pro-free');
NODE
dsh web
TEAMOROUTER_SETUP
Windows PowerShell
npm install -g @deepseek-ai/dsh
$env:TEAMOROUTER_API_KEY = 'sk-teamo-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.teamorouter = {
displayName: 'TeamoRouter',
apiKeyEnv: 'TEAMOROUTER_API_KEY',
api: 'openai-completions',
baseURL: 'https://api.teamorouter.com/v1',
models: [
{ id: 'deepseek-v4-pro', name: 'DeepSeek V4 Pro' },
{ id: 'deepseek-v4-pro-free', name: 'DeepSeek V4 Pro Free' },
{ id: 'deepseek-v4-flash', name: 'DeepSeek V4 Flash' },
{ id: 'deepseek-v4-flash-free', name: 'DeepSeek V4 Flash Free' },
{ 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: 'teamorouter',
model: 'deepseek-v4-pro-free'
};
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('TeamoRouter configured. Default model: deepseek-v4-pro-free');
'@ | node
if ($LASTEXITCODE -eq 0) {
dsh web
}
The command installs DeepSeek Harness, backs up and merges any existing configuration, stores your key, configures the TeamoRouter 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:
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:
export TEAMOROUTER_API_KEY="sk-teamo-xxxxxx"
dsh --profile headless "Reply with OK only"
If the terminal returns OK, DeepSeek Harness has successfully called a model through TeamoRouter. Run dsh web to open the web interface.
4. Add and switch models
To choose from multiple TeamoRouter models in Harness, add them to the same models list. This example includes paid and free DeepSeek V4 models together with several GPT models:
llm-pi-ai:
providers:
teamorouter:
displayName: TeamoRouter
apiKeyEnv: TEAMOROUTER_API_KEY
api: openai-completions
baseURL: https://api.teamorouter.com/v1
models:
- id: deepseek-v4-pro
name: DeepSeek V4 Pro
- id: deepseek-v4-pro-free
name: DeepSeek V4 Pro Free
- id: deepseek-v4-flash
name: DeepSeek V4 Flash
- id: deepseek-v4-flash-free
name: DeepSeek V4 Flash Free
- 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: teamorouter
model: deepseek-v4-pro-free
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.
TeamoRouter's model catalog is updated continuously. To confirm the current model IDs, run:
curl https://api.teamorouter.com/v1/models \
-H "Authorization: Bearer sk-teamo-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-teamo-. If the error continues, create a new key in the TeamoRouter dashboard and try again.