Skip to content

DeepSeek Harness (DSH) ​

Pricing: see the model page https://modelfold.ai/pricing

AI Agents directory

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:

bash
npx @deepseek-ai/dsh web

The 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 ​

  1. Create a ModelFold API key in Console → API Keys and check your wallet balance.
  2. Open Settings → Models → Add model provider, then switch to Custom model API.
  3. Enter the values below. Do not enter your ModelFold key in the default DeepSeek provider.
  4. Use Model catalog → Fetch available models, or add exact IDs manually, and save the provider.
  5. Select its model and start a new session. Existing sessions may retain their previous model.
FieldValue
Provider IDmodelfold (custom lowercase ID; cannot be renamed after saving)
Display nameModelFold
Base URLhttps://modelfold.ai/v1
API protocolOpenAI Chat Completions (openai-completions in configuration)
API keyYour ModelFold key, without a Bearer prefix
Model IDFor 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:

bash
export MODELFOLD_API_KEY="your ModelFold API key"
npx @deepseek-ai/dsh web

In 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.

yaml
- 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-flash

apiKeyEnv 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.

These IDs were checked against ModelFold /v1/models on 2026-11-10. Being listed does not verify every DSH agent feature.

ModelGuidance
claude-opus-5-5A Claude option for complex coding tasks; read the caching notes before long conversations
gpt-6-1-solWorth evaluating for long tasks; the API test returned cached tokens, but did not establish additional long-prefix caching
deepseek-v4-1-flashA 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:

bash
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) ​

ModelFirst input / cached_tokensSecond input / cached_tokensResult
gpt-6-1-sol9420 / 20489443 / 2048Both HTTP 200; the second turn reported cached usage, but the unchanged count does not establish caching of the added long context
deepseek-v4-1-flash4882 / 04895 / 0Both 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 ​

SymptomAction
401 / invalid_api_keyUse 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_modelCopy the exact ID from /v1/models or the ID guide, add it to the provider and select it in a new session
404 / HTML responseUse https://modelfold.ai/v1; remove duplicate /v1 or /chat/completions segments
Timeout / 502 / 504Reduce 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: lengthReasoning 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 URLUse 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.

ModelFold — one API for all the best AI models.