DeepSeek Harness with TrustedRouter: setup and models
Add TrustedRouter to DeepSeek Harness as a custom model API and keep prompts on confidential GPUs with trustedrouter/trusted.One custom provider, then keep your code where the GPU host can't read it.
Up to 1 million free tokens. No card required.
DeepSeek Harness (DSH) can send its model requests through TrustedRouter. Add TrustedRouter as a Custom model API with the base URL https://api.trustedrouter.com/v1 and the OpenAI Chat Completions protocol, then pick models. Settings names follow DeepSeek Harness 0.2.2's model guide, as of .
Why route DeepSeek Harness through TrustedRouter
A coding agent sends your code with every request, so the first question is who can read it. Choose trustedrouter/trusted and requests run only on Trusted-tier endpoints from Tinfoil and Privatemode. Each one needs verified confidential compute, provider-side E2EE and explicit zero data retention, so the GPU host can't read your prompts. TrustedRouter's attested gateway still forwards each request in memory. Its first choice is DeepSeek V4.1 Flash 1017. If no qualifying route is available, the request fails instead of falling back to a less private provider.
One key reaches 600+ models, including the DeepSeek V4 family, from 100+ providers. Other routes let you choose which providers may see a prompt: Open, ZDR or TEE privacy tiers, an EU-focused pool, or the end-to-end encrypted route. Keys carry daily, weekly and monthly spend limits, which helps when an agent runs unattended.
Set it up in the app
- Create a key in Console → API Keys.
- In DeepSeek Harness, open Settings → Models, choose Add model provider, then switch the card to Custom model API.
- Enter the Provider ID
trustedrouter, the base URLhttps://api.trustedrouter.com/v1, the API protocol OpenAI Chat Completions, and your key. The Provider ID can't be changed later. - Under Models, choose Fetch available models, tick the models you want, and choose Update list. Start with
trustedrouter/trustedfor private work. Adddeepseek/deepseek-v4.1-flashtoo if a lower price matters more than who serves the request. - Save, then pick a TrustedRouter model in the model picker. It becomes the default for new sessions.
Set it up in a config file
Add the route to $DSH_HOME/profiles/<profile>/cordis.patch.yml. For dsh web, the profile is web. A Cordis override replaces the whole entry, so if the file already has an llm-pi-ai entry, add trustedrouter to its providers instead of adding a second entry.
- id: llm-pi-ai
config:
providers:
trustedrouter:
apiKeyEnv: TRUSTEDROUTER_API_KEY
api: openai-completions
baseURL: https://api.trustedrouter.com/v1
models:
- id: trustedrouter/trusted
- id: deepseek/deepseek-v4.1-flash
- id: trustedrouter/e2e
- id: trustedrouter/zdr
- id: trustedrouter/eu
Set TRUSTEDROUTER_API_KEY in the environment that runs DeepSeek Harness. apiKeyEnv names the variable, so the key never enters the file. DeepSeek Harness reads the file again on the next request, so nothing needs a restart. See DeepSeek Harness's model configuration guide for images, reasoning levels and request settings.
To check the key and model before starting a session:
curl https://api.trustedrouter.com/v1/chat/completions \
-H "Authorization: Bearer $TRUSTEDROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek/deepseek-v4.1-flash","messages":[{"role":"user","content":"Reply with PONG only."}],"max_tokens":16}'
A 200 response means the key and model work. The reply text can be empty when the model spends the small token budget on reasoning.
Which model to choose
| Model ID | What it does |
|---|---|
trustedrouter/trusted | Runs only on Trusted-tier confidential endpoints, so the GPU host can't read prompts. Prefers DeepSeek V4.1 Flash 1017 and falls back to other open models in the same tier. The recommended private choice for DeepSeek Harness. |
deepseek/deepseek-v4.1-flash | DeepSeek V4.1 Flash with 1,048,576 context tokens, from any catalog provider that serves it. |
trustedrouter/e2e | Routes requiring verified confidential compute, provider E2EE and explicit ZDR. |
trustedrouter/zdr | Routes restricted to zero data retention providers. |
trustedrouter/eu | Prefers EU-focused and privacy-forward routes. A preference, not a data-residency guarantee; see Europe-focused routing. |
The trustedrouter/ pools choose the model as well as the provider, so a request can be answered by a model other than DeepSeek. A specific model ID, such as deepseek/deepseek-v4.1-flash, stays on that model but can be served by any provider on its model page, including providers that don't confirm which countries they run inference in. To keep a specific model and limit who sees a prompt, the API's provider.min_privacy request field (for example zdr, confidential or trusted) filters providers when your setup can send it; read who can see your data to choose. For EU work, the regional base URL is https://api-europe-west4.quillrouter.com/v1, and strict residency needs an approved provider list.
What DeepSeek through TrustedRouter costs
DeepSeek V4.1 Flash has 20 prepaid provider routes. Ranked by input plus output price, the lowest is Engy at $0.03165 input / $0.1266 output per million tokens; the highest is IO Intelligence at $0.865311 / $3.537837. These TrustedRouter retail rates include the standard markup and use the 4,000-token context tier. Prices collected ; IO Intelligence prices collected ; all provider routes and limits.
DSH Go on a phone
DSH Go is a community-built Android app, not made by DeepSeek. It runs DeepSeek Harness on the phone or connects to a DeepSeek Harness host. Model providers belong to that DeepSeek Harness, so add TrustedRouter there with the steps above.
Troubleshooting
MISSING_CREDENTIAL: the variable named inapiKeyEnvis empty in the environment that runs DeepSeek Harness.- 401: the key is wrong or disabled. Check it in Console → API Keys.
- The model picker has no Effort menu: models added by hand declare no reasoning levels. Add them under the model's Model options.
Questions
How do I use TrustedRouter in DeepSeek Harness?
Open Settings, Models, Add model provider, and choose Custom model API. Enter the Provider ID trustedrouter, the base URL https://api.trustedrouter.com/v1, the OpenAI Chat Completions protocol and a TrustedRouter key, then fetch models.
Which providers serve DeepSeek through TrustedRouter?
A specific model ID can be served by any provider on its model page. For private work, choose trustedrouter/trusted: it runs only on Trusted-tier confidential endpoints from Tinfoil and Privatemode, prefers DeepSeek V4.1 Flash, and fails instead of falling back to a less private provider. The trustedrouter/zdr and trustedrouter/e2e pools also restrict providers. All three choose the model too.