What is DeepSeek Harness?
DeepSeek Harness is an open-source agent harness for DeepSeek models that can use self-hosted and custom provider configurations.
This guide configures a TokenHub provider in DeepSeek Harness, then validates it with a low-risk agent task. Use a model with reliable tool calling before running longer autonomous workflows. An agent harness coordinates context, tools, and task loops around a model endpoint, so ordinary DeepSeek chat compatibility is not enough. The available search evidence is limited and does not support a universal “best harness” claim; compare setup effort, native tool calls, latency, context, and cost in your own repository.
DeepSeek Harness (dsh) can add TokenHub as a custom provider from its Models page. Each provider must declare one protocol actually exposed by the gateway. For TokenHub OpenAI Chat Completions, use openai-completions with https://us-api.tokenhub.com/v1.
DeepSeek Harness remains in developer preview, and its maintainers warn that releases may contain breaking changes. Validate the connection with a low-risk task before using a real repository.
When this integration is a good fit
DeepSeek Harness is intended for development workflows that combine a model, tools, and a workspace into an agent. It persists providers, models, and session settings. Choose a stable Provider ID before creating it so that you do not later have to migrate default-model and session references.
Start DeepSeek Harness
Use the official command to start its local Web UI:
npx @deepseek-ai/dsh webThis starts the local UI and attempts to open it in a browser. When running over SSH or in a remote environment, follow the project's Web UI guidance for the access address. Confirm the UI is reachable before configuring a provider.
Prepare the TokenHub credential and model
Create an API key in the TokenHub dashboard and copy an exact model ID from the model catalog. Never commit the key to a repository or share it.
| Field | Value |
|---|---|
| Provider ID | Use a stable lowercase ID such as tokenhub |
| Base URL | https://us-api.tokenhub.com/v1 |
| API protocol | openai-completions |
| Credential | TokenHub API key |
| Model ID | Exact ID from the TokenHub model catalog |
Add the TokenHub custom provider
- Open Settings → Models.
- Choose Add a custom provider. Do not configure TokenHub as one of the built-in providers.
- Enter the lowercase Provider ID, display name, Base URL, API protocol, and API key.
- Add at least one exact TokenHub model ID to the model list and save.
- Return to the model selector, choose the provider and model you saved, and create a new session to verify it.
One provider can use only one protocol. If a gateway exposes OpenAI Chat Completions, Responses, and Anthropic Messages, create a separate provider for each protocol instead of mixing them.
Saved sessions, default models, and credentials reference the Provider ID. To rename it, create a new provider, select a new default model, and then migrate old settings if necessary.
Add a model manually when discovery fails
The Model catalog can use Fetch available models to retrieve a model list. This depends on a compatible list-models response and is a convenience, not a prerequisite.
If the fetch fails or returns an empty list:
- Keep the correct Base URL, protocol, and API key.
- Enter the complete model ID from TokenHub manually.
- Save the provider and send a simple request from a new session.
- Confirm the model, status, and usage in TokenHub request logs.
A discovery failure alone does not mean the model is unavailable.
Advanced configuration in settings.yaml
The Models page covers routing fields: API key, display name, Base URL, protocol, and model ID. Configure image input, reasoning effort, compatibility overrides, request headers, timeouts, and retry policy in $DSH_HOME/settings.yaml.
For example, declare image input only when the exact model supports it:
llm-pi-ai:
providers:
tokenhub:
apiKeyEnv: TOKENHUB_API_KEY
api: openai-completions
baseURL: __API_BASE_URL__/v1
models:
- id: YOUR_TOKENHUB_MODEL_ID
input: [text, image]The official guide says the adapter reads saved settings.yaml changes on the next request, normally without a restart. Do not add overrides such as supportsDeveloperRole or maxTokensField speculatively; use them only when the gateway requires them or rejects the default request.
Verify that requests reach TokenHub
- Confirm the provider and model are saved on the Models page.
- Create a new session and select the TokenHub model.
- Run a low-risk task, such as explaining one file or summarizing a short block of code.
- Confirm the exact model ID, response status, and usage in TokenHub logs.
- Then test tools, long tasks, and image input one capability at a time.
An existing session keeps the model recorded in its session log. After changing the default, verify with a new session.
Troubleshooting
| Symptom | What to do |
|---|---|
| Provider must be renamed | Create a new provider and reselect the default model; do not rely on renaming in place. |
| Fetch available models fails | Add the complete TokenHub model ID manually; discovery is optional. |
| 404 or request-format error | Check for openai-completions, https://us-api.tokenhub.com/v1, and no full endpoint path in Base URL. |
| Advanced parameters do not apply | Inspect $DSH_HOME/settings.yaml; the basic Models form does not contain reasoning, image, timeout, or retry fields. |
| Old session ignores a new default | Create a new session; sessions with requests retain their original model. |
Official references
Choose a compatible DeepSeek Harness model
DeepSeek Harness provider FAQ
What are DeepSeek Harness and DeepSeek Code Harness?
The terms refer here to an agent harness that coordinates context, tools, and task loops around DeepSeek-oriented coding models.
Can DeepSeek Harness use a custom provider?
Use its documented OpenAI-compatible custom-provider fields, enter the TokenHub Base URL, and read the API key from an environment variable.
Which model should I use with DeepSeek Harness?
Choose a coding model with reliable native tool calling, sufficient context, and verified support for the configured protocol.
Is DeepSeek Harness the best option for my project?
The available search evidence is too limited for a universal best claim. Compare setup, tool success, latency, context, and cost in your own repository.
What should I check when DeepSeek Harness fails?
Check the Base URL, environment variable, API key, model ID, and native tool support, then use TokenHub logs to identify whether the request arrived.
References
This setup is based on TokenHub and official documentation, last verified on 2026-09-04.