DeepSeek Harness
Set up DeepSeek Harness (dsh) with Kourier's flat-rate DeepSeek V4.1 Flash coding plan using a custom OpenAI-compatible provider.
DeepSeek Harness (dsh) is DeepSeek's open-source, plugin-based agent harness. Connect its Web UI to Kourier to use deepseek-v4.1-flash on your Pro or Max plan.
You need Node.js, pnpm, and a Kourier API key. See Get an API key; no invite is needed. Your Kourier key is not a DeepSeek-platform key: configure a Custom model API, not the built-in DeepSeek card.
DeepSeek Harness is in developer preview and may introduce breaking changes. Review its safety notice before running it: the agent can edit files and run commands in your workspace.
1. Start the harness
From the project directory you want the agent to work in, run:
pnpm dlx @deepseek-ai/dsh webThe command starts the Web UI at http://127.0.0.1:3080 by default and opens your browser for a local launch. Keep the process running while you use the harness. If the browser does not open, visit the URL printed in the terminal.
2. Add Kourier as a custom provider
Open Settings → Models → Add model provider, then switch to Custom model API. Enter:
| Setting | Value |
|---|---|
| Provider ID | kourier |
| Display name | Kourier |
| Base URL | https://api.kourier.sh/v1 |
| API protocol | OpenAI Chat Completions (openai-completions) |
| API key | Your Kourier key (sk-bf-...) |
The provider ID is permanent, so use kourier from the start. Do not use https://api.deepseek.com or the Anthropic endpoint with this configuration.
Under Model catalog, choose Fetch available models, select deepseek-v4.1-flash, and choose Add selected. If discovery is unavailable, add the model manually with the exact ID below.
Check the model settings before saving:
| Model setting | Value |
|---|---|
| Model ID | deepseek-v4.1-flash |
| Display name | DeepSeek V4.1 Flash (Kourier) |
| Context window | 262144 |
| Max output tokens | 16384 |
| Input types | Text only |
The context window includes prompt plus output combined; see Model limits. Save or create the provider to persist the settings. Fetching the model list alone does not save it.
The harness stores the key in $DSH_HOME/.credentials.yaml and keeps a credential reference in its settings. The Models page shows a redacted descriptor after saving. Keep the credentials file private and out of version control.
3. Select a workspace and model
Click Choose workspace, add your project directory, and select it. A fresh Web UI does not select a workspace automatically, even if you launched dsh from that directory.
Select DeepSeek V4.1 Flash (Kourier) from the model picker and start a new session. Model selection also sets the default for new sessions; a session that has already sent a request keeps the model recorded in its own log.
For a first check, send:
Summarize this repository and identify its main packages. Do not modify files or run commands.
Confirm that the session uses the Kourier model and returns a response before asking it to make changes. Review permission prompts before approving file edits or commands.
Concurrency and subagents
Pro allows 3 simultaneous requests and Max allows 7. Each active model request, including a subagent's streaming request, uses a slot. If you receive 429 with Retry-After, wait for active requests to finish or reduce parallel work.
Troubleshooting
| Symptom | Fix |
|---|---|
401 Invalid or missing API key | Edit the custom Kourier provider and save the API key from your Kourier dashboard, not a DeepSeek-platform key. |
| Model not found | Use the exact model ID deepseek-v4.1-flash; older IDs and aliases are not translated. |
| Model discovery fails or lists nothing | Check the base URL, protocol, and key, then add the exact model ID manually. |
| Composer is unavailable | Select a workspace and a configured model. |
| Existing session still uses another model | Start a new session after selecting the Kourier model. |
429 with Retry-After | Wait or reduce simultaneous requests and subagents to fit your plan's concurrency limit. |
For upstream UI changes and advanced configuration, see the official model configuration guide.