Blog

Connect DeepSeek Harness to TeamoRouter: One-Line DEEPSEEK_BASE_URL Config | TeamoRouter

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:

bash
export DEEPSEEK_API_KEY="sk-teamo-your-key"
export DEEPSEEK_BASE_URL="https://api.teamorouter.com/v1"

Optionally set the default model:

bash
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_URL is 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_KEY is your TeamoRouter key (starts with sk-teamo-). Never hardcode it in the repo — use env vars or .env.
  • DEEPSEEK_DEFAULT_MODEL sets the default for new sessions. deepseek-v4-pro is the paid Pro, deepseek-v4-pro-free the 200/day free tier, deepseek-v4-flash-free likewise.

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):

bash
# 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.

bash
npx @deepseek-ai/dsh web

Open http://127.0.0.1:3080, start a session, and give it a task that reveals the model:

text
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:

  1. Proxy-free access — direct connections to DeepSeek's official API often time out from certain regions; TeamoRouter is optimized for it.
  2. Free tierdeepseek-v4-pro-free / deepseek-v4-flash-free give 200 requests/day each, enough for a full day of light agent work.
  3. One key, many models — switch between DeepSeek, Claude, GPT, and Gemini inside dsh without registering and funding each platform separately.
  4. Flat pricing — paid deepseek-v4-pro is $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.

Ready to connect?Log in · top up · create an API key — three steps to start.
Connect DeepSeek Harness to TeamoRouter: One-Line DEEPSEEK_BASE_URL Config | TeamoRouter · TeamoRouter