DeepSeek Harness

DeepSeek Harness (`dsh`) is DeepSeek's open source agent harness built on the idea that everything is a plugin: tools, modes and model routing can be swapped or extended in configuration without touching source code. It offers a Web UI, CLI modes and a Python SDK, and records everything the model sees in an append-only log you can resume, fork and replay.

Already have an account? Sign in

codelux.configExample
agent
deepseek-harness
endpoint
codelux.io/v1/chat/completions
route
anthropic / claude-sonnet-5
status
available
  • DeepSeek Harness
Codelux Gateway
  • claude-sonnet-5
  • claude-opus-5-5
  • gpt-6-sol
  • DeepSeek-V41-Flash
  • kimi-k3
  • glm-5.3
Example: DeepSeek Harness connects to Codelux Gateway at codelux.io/v1/chat/completions and uses anthropic / claude-sonnet-5. The same agent can switch between claude-sonnet-5, claude-opus-5-5, gpt-6-sol, DeepSeek-V41-Flash, kimi-k3, glm-5.3 and more.

How to use DeepSeek Harness with Codelux

About 10 minutes: start the dsh Web UI with npx → create a key in Portal → add a custom model API in Settings → Models → pick a workspace and model. DeepSeek Harness is a developer preview, so the UI and config may change between versions.

1. Install and start DeepSeek Harness

Requires Node.js 22.19+ (or 24+).

Install Node.js

Install Node.js 22 LTS or newer from nodejs.org, then check the version:

Terminal
node --version

Start the Web UI

In your project directory, run:

Terminal
cd your-project
npx @deepseek-ai/dsh web

It starts at http://127.0.0.1:3080 and opens your browser; add --no-open to start the server only. dsh uses the launch directory as its default file-system location.

Terminal
git clone https://github.com/deepseek-ai/deepseek-harness.git
cd deepseek-harness
pnpm install
pnpm run build
pnpm dsh web

2. Add Codelux as a custom model API

Add it in the Web UI under Settings → Models. Changes apply on the next request without a restart.

Create a Codelux account and API key

  1. Go to Codelux Portal and create an account (existing users sign in).
  2. Pick a subscription plan or top up in Billing — any balance works for every agent.
  3. Open API Keys in the left menu and click Create New Key. Give it a name you will recognise, such as the agent's name.
  4. After it is created, copy the API key (starts with sk-) and the API base URL. The key is shown in full only once, so keep it somewhere safe.

Add a custom model API

  1. Open Settings → Models and click Add model provider.
  2. Switch the card from Third-party model provider to Custom model API.
  3. Provider ID: codelux (lowercase; it can't be renamed later). Display name: Codelux.
  4. API URL: https://codelux.io/v1.
  5. API protocol: OpenAI Chat Completions (Codelux also supports OpenAI Responses and Anthropic Messages; one provider uses one protocol).
  6. API key: paste your Codelux key. It is write-only and stored in $DSH_HOME/.credentials.yaml.
DeepSeek Harness custom model API form: provider ID, display name, API URL, API protocol and API key
The custom model API form. · DeepSeek Harness docs (MIT)

Fetch and add models

Under Model catalog, click Fetch available models. dsh asks Codelux for its model list; search, tick the models you want, click Add selected, then save the provider. If fetching fails, typing model IDs from Portal → AI Hub works just the same.

DeepSeek Harness models page with the DeepSeek card and the add model provider entry
The Settings → Models page. · DeepSeek Harness docs (MIT)

(If requests are rejected) Adjust compatibility

If the URL and key are correct but requests are still rejected, add compatibility settings to the Codelux route in $DSH_HOME/profiles/web/cordis.patch.yml (or click Open config file at the top of Settings):

cordis.patch.yml
- id: llm-pi-ai
  config:
    providers:
      codelux:
        apiKeyEnv: CODELUX_API_KEY
        api: openai-completions
        baseURL: https://codelux.io/v1
        compat:
          supportsDeveloperRole: false
          maxTokensField: max_tokens
        models:
          - id: deepseek-v4-flash
          - id: claude-sonnet-5

For models that think by default (such as DeepSeek V4) behind an OpenAI-compatible gateway, set compat.thinkingFormat: deepseek on the model so the “off” reasoning level really turns thinking off.

3. Start using DeepSeek Harness

Pick a workspace and a model, then start your first session.

Choose a workspace

Click Select workspace, add the project directory you launched dsh from and select it. The input box is disabled until a workspace is selected.

Pick a model and run a task

Pick a Codelux model in the model selector (it becomes the default for new sessions), then send a task, for example:

Prompt
Summarize this repository and identify its main packages.

The agent reads and edits files, runs commands and keeps a plan; actions that need approval ask you first. Usage and charges for each request are in Portal → Logs.

FAQ

MISSING_CREDENTIAL

Save the key on the models page, or set the environment variable named in apiKeyEnv.

UNKNOWN_MODEL

Pick a configured model, or add the missing model ID to the Codelux provider.

Fetch available models returns 401

Check the API key. Model discovery calls GET /models under the API URL.

Only reasoning models fail

Set compat.supportsDeveloperRole: false on the route so system prompts aren't sent with the developer role.

Official references