DeepSeek Harness (dsh)
Connect DeepSeek Harness to HopBase with one custom provider.
DeepSeek Harness (dsh) is DeepSeek's open-source agent runtime. It reaches any gateway through a custom provider — base URL, protocol, and model IDs, with nothing hardcoded.
Pick the protocol for your model family
dsh needs to know which wire protocol to speak. That depends on the model family, not on dsh.
| Model family | api | baseURL |
|---|---|---|
| DeepSeek, GPT / Codex, GLM, Kimi, Grok, Qwen | openai-completions | https://api.hop-base.com/v1 |
| Claude | anthropic-messages | https://api.hop-base.com (no /v1) |
A HopBase key reaches the model families of the plan groups it includes. If you want DeepSeek and Claude in the same dsh install, add two providers, one per protocol; both can use the same key if it includes both groups. A key without the model's group returns 404 model_not_found.
Configure with the settings file
Function calling and streaming usage have been verified end to end against HopBase.
Add a provider
Open $DSH_HOME/settings.yaml and add an entry under providers:
providers:
hopbase:
api: openai-completions
baseURL: https://api.hop-base.com/v1
apiKeyEnv: HOPBASE_API_KEY
models:
- id: deepseek-v4-pro-202606
- id: deepseek-v4-flash-202605
- id: glm-5.3List only the models your key can actually reach. Read the exact IDs from GET /v1/models with that key rather than copying this example.
Export the key
export HOPBASE_API_KEY=sk-your-keyapiKeyEnv names the environment variable; dsh reads the key from it at launch. Never put the key itself in settings.yaml.
Confirm the model list
curl https://api.hop-base.com/v1/models \
-H "Authorization: Bearer sk-your-key"Every ID you listed under models must appear in this response. If one is missing, none of that key's groups serves it.
Send a first request
Start dsh, select the provider, and ask for a one-word reply. A successful round trip confirms the base URL, the key, the protocol, and the model ID all line up.
Configure from the web UI
Settings → Models → Add a custom provider, then fill in the same four values: protocol, base URL, key variable, and model IDs. The protocol table above applies here too.
Adding a second family
To use Claude alongside DeepSeek, add a second provider rather than editing the first — the protocol and the base URL both differ:
providers:
hopbase:
api: openai-completions
baseURL: https://api.hop-base.com/v1
apiKeyEnv: HOPBASE_API_KEY
models:
- id: deepseek-v4-pro-202606
hopbase-claude:
api: anthropic-messages
baseURL: https://api.hop-base.com
apiKeyEnv: HOPBASE_CLAUDE_API_KEY
models:
- id: claude-sonnet-5Troubleshooting
| Symptom | Cause |
|---|---|
401 on every request | The environment variable named by apiKeyEnv is unset in the shell that launched dsh |
404 model_not_found | The model is not served by any of this key's groups, or the ID was shortened. Re-read GET /v1/models |
404 on Claude only | baseURL carries a /v1 suffix. The Anthropic protocol takes the bare host |
| Requests reach the wrong model | Two providers share one apiKeyEnv. Give each family its own variable |
Next steps
- DeepSeek V4 is the model contract behind this page — endpoints, reasoning output, caching, and the request rewrites to expect
- Available models: find the model IDs available to a key
- Troubleshooting: look up an error message