DeepSeek Harness (DSH)
Pricing: see the model page https://modelfold.ai/pricing
DeepSeek Harness (DSH) is DeepSeek's open-source coding agent environment. A custom provider connects it to ModelFold's OpenAI Chat Completions API for code reading, editing and tool use.
Install and start
Install Node.js, then use the official npm launch command:
npx @deepseek-ai/dsh webThe Web UI opens at http://127.0.0.1:3080 by default. Add --no-open to start without opening a browser. DSH is in developer preview; upgrades may change settings and configuration formats.
Configure ModelFold
- Create a ModelFold API key in Console → API Keys and check your wallet balance.
- Open Settings → Models → Add model provider, then switch to Custom model API.
- Enter the values below. Do not enter your ModelFold key in the default DeepSeek provider.
- Use Model catalog → Fetch available models, or add exact IDs manually, and save the provider.
- Select its model and start a new session. Existing sessions may retain their previous model.
| Field | Value |
|---|---|
| Provider ID | modelfold (custom lowercase ID; cannot be renamed after saving) |
| Display name | ModelFold |
| Base URL | https://modelfold.ai/v1 |
| API protocol | OpenAI Chat Completions (openai-completions in configuration) |
| API key | Your ModelFold key, without a Bearer prefix |
| Model ID | For example, claude-opus-5-5; not a display name or a modelfold/ prefix |
DSH appends /chat/completions. Do not add that suffix to the base URL or duplicate /v1. Model discovery uses GET https://modelfold.ai/v1/models with the same key.
Copyable configuration
Saving the key through the UI is recommended. For manual configuration, the current official format supports a referenced environment variable. Set it in the terminal that starts DSH:
export MODELFOLD_API_KEY="your ModelFold API key"
npx @deepseek-ai/dsh webIn Windows PowerShell, use $env:MODELFOLD_API_KEY = "your ModelFold API key" before starting DSH.
Merge this into the file opened by Settings → Open configuration file. The current Web profile uses $DSH_HOME/profiles/web/cordis.patch.yml (DSH_HOME defaults to ~/.dsh). If llm-pi-ai already exists, add modelfold under its config.providers and preserve other providers and fields; do not replace the entire file with this snippet.
- id: llm-pi-ai
config:
providers:
modelfold:
apiKeyEnv: MODELFOLD_API_KEY
api: openai-completions
baseURL: https://modelfold.ai/v1
compat:
supportsDeveloperRole: false
maxTokensField: max_tokens
models:
- id: claude-opus-5-5
- id: gpt-6-1-sol
- id: deepseek-v4-1-flashapiKeyEnv is the variable name, not the secret. The compat fields select the system role and max_tokens output limit. Older releases may use a different layout: follow the settings UI of your installed DSH version, and do not overwrite an older configuration with the new YAML format.
Recommended models
These IDs were checked against ModelFold /v1/models on 2026-11-10. Being listed does not verify every DSH agent feature.
| Model | Guidance |
|---|---|
| claude-opus-5-5 | A Claude option for complex coding tasks; read the caching notes before long conversations |
| gpt-6-1-sol | Worth evaluating for long tasks; the API test returned cached tokens, but did not establish additional long-prefix caching |
| deepseek-v4-1-flash | A DeepSeek candidate; no cache hit was observed in this test |
Verify the connection
Fetch the model list first (this does not generate content), then send “Reply only OK” in a new DSH session:
curl https://modelfold.ai/v1/models \
-H "Authorization: Bearer $MODELFOLD_API_KEY"The measurements below used direct API requests with a test key, not end-to-end operations in the DSH UI. Successful model discovery alone does not verify tools, streaming or long tasks.
API measurements (2026-11-10)
| Model | First input / cached_tokens | Second input / cached_tokens | Result |
|---|---|---|---|
gpt-6-1-sol | 9420 / 2048 | 9443 / 2048 | Both HTTP 200; the second turn reported cached usage, but the unchanged count does not establish caching of the added long context |
deepseek-v4-1-flash | 4882 / 0 | 4895 / 0 | Both HTTP 200; no cache hit observed |
The field is usage.prompt_tokens_details.cached_tokens. Both DeepSeek responses ended with finish_reason: length, with reasoning consuming the small output budget. This test measures input caching, not complete answer quality. Gemini and Claude caching were not tested in this run, so no caching result is claimed for them. Keep shared prefixes stable, compact context regularly and start separate sessions for independent tasks.
Troubleshooting
| Symptom | Action |
|---|---|
401 / invalid_api_key | Use an active ModelFold key without Bearer in the key field; check the DSH process environment and that a custom provider is selected |
Missing model / UNKNOWN_MODEL / unsupported_model | Copy the exact ID from /v1/models or the ID guide, add it to the provider and select it in a new session |
| 404 / HTML response | Use https://modelfold.ai/v1; remove duplicate /v1 or /chat/completions segments |
| Timeout / 502 / 504 | Reduce context and task size; check network access and request logs. Confirm the previous request's status before retrying to avoid duplicates |
Empty reply / finish_reason: length | Reasoning may exhaust the output budget; increase the output limit as appropriate instead of repeatedly submitting the same request |
| Parameter errors despite a valid key and URL | Use the compat system-role and max_tokens settings above; follow the current DSH UI and model capabilities for other options |
Official references
Installation, UI paths and YAML fields checked on 2026-11-10: DeepSeek's official repository and installation instructions, official provider guide, pi-ai adapter reference. Follow the official documentation for your current version.
