Quick Answer
DeepSeek Harness (dsh) sends model requests to DeepSeek's official API by default. To switch it to TeamoRouter — proxy-free access, one key across multiple providers, and the deepseek-v4-pro-free free tier — you only need two environment variables:
export DEEPSEEK_API_KEY="sk-teamo-your-key"
export DEEPSEEK_BASE_URL="https://api.teamorouter.com/v1"
Optionally set the default model:
export DEEPSEEK_DEFAULT_MODEL="deepseek-v4-pro-free"
Restart dsh and it runs on TeamoRouter. Below, each step, why it works, and the common pitfalls.
The Three Environment Variables That Matter
DeepSeek Harness reads its model backend from environment variables. Only three concern you:
| Variable | Purpose | Example |
|---|---|---|
DEEPSEEK_API_KEY |
Auth key | sk-teamo-xxxxxx |
DEEPSEEK_BASE_URL |
Model endpoint | https://api.teamorouter.com/v1 |
DEEPSEEK_DEFAULT_MODEL |
Default model ID | deepseek-v4-pro-free |
DEEPSEEK_BASE_URLis the critical line. dsh defaults to DeepSeek's public API; pointing it at TeamoRouter routes every model request through TeamoRouter's OpenAI-compatible endpoint. Keep the/v1— the OpenAI SDK needs it; without it you get a 404.DEEPSEEK_API_KEYis your TeamoRouter key (starts withsk-teamo-). Never hardcode it in the repo — use env vars or.env.DEEPSEEK_DEFAULT_MODELsets the default for new sessions.deepseek-v4-prois the paid Pro,deepseek-v4-pro-freethe 200/day free tier,deepseek-v4-flash-freelikewise.
Full Setup Steps
1. Get a key. Register at TeamoRouter and create an API key (sk-teamo-...) in the console.
2. Add to your shell profile. Edit ~/.zshrc (or ~/.bashrc):
# DeepSeek Harness → TeamoRouter
export DEEPSEEK_API_KEY="sk-teamo-your-key"
export DEEPSEEK_BASE_URL="https://api.teamorouter.com/v1"
export DEEPSEEK_DEFAULT_MODEL="deepseek-v4-pro-free"
Then source ~/.zshrc to apply.
3. Restart dsh and verify.
npx @deepseek-ai/dsh web
Open http://127.0.0.1:3080, start a session, and give it a task that reveals the model:
Introduce yourself in one sentence and tell me your current model ID.
If the reply mentions deepseek-v4-pro-free (or your chosen model), routing works.
Why Point dsh at TeamoRouter
The default official-API setup has a few pain points that TeamoRouter resolves:
- Proxy-free access — direct connections to DeepSeek's official API often time out from certain regions; TeamoRouter is optimized for it.
- Free tier —
deepseek-v4-pro-free/deepseek-v4-flash-freegive 200 requests/day each, enough for a full day of light agent work. - One key, many models — switch between DeepSeek, Claude, GPT, and Gemini inside dsh without registering and funding each platform separately.
- Flat pricing — paid
deepseek-v4-prois $1.74/$3.48 flat, without the peak/off-peak pricing DeepSeek is introducing (see DeepSeek V4 Pricing After Aug 16).
Common Pitfalls
dsh starts but I get 404 / connection failed?
Check that DEEPSEEK_BASE_URL includes /v1. TeamoRouter's OpenAI-compatible endpoint is https://api.teamorouter.com/v1; the OpenAI SDK appends /chat/completions, so a missing /v1 produces a bad URL.
401 auth error?
The key isn't applied or was copied incompletely. echo $DEEPSEEK_API_KEY to confirm it starts with sk-teamo- and has no stray whitespace, and that it wasn't deleted in the console.
Can I switch models per session instead of changing the default?
Yes. DEEPSEEK_DEFAULT_MODEL is only a default; the Web UI's model picker switches deepseek-v4-pro, deepseek-v4-flash, etc. per session.
How do I move between free and paid models?
When the free quota is exhausted, change the model ID from deepseek-v4-pro-free to deepseek-v4-pro — the paid model has no account-level rate limit. It's a one-word migration.
Which wins, env vars or .env?
dsh accepts a .env in the repo root or process env vars. Explicitly exported env vars take precedence; if you use .env, add it to .gitignore so the key is never committed.
Once configured, run DeepSeek V4 Pro inside dsh, burn the 200 free requests first, then pay flat rates past that. Register TeamoRouter to start.