1. What is DeepSeek Harness
DeepSeek Harness (command dsh) is an open-source agent framework by DeepSeek, built on an "everything-is-a-plugin" architecture. It features a built-in Web UI and supports CLI and SDK execution, making it perfect for allowing AI to read files, modify code, and execute tasks within your workspace.
2. Launching the Web UI
You need to install Node.js first, then run:
npx @deepseek-ai/dsh web
This command launches the Web UI at http://127.0.0.1:3080 by default and opens your browser automatically. To disable auto-opening, you can append --no-open. To run from source:
git clone https://github.com/deepseek-ai/deepseek-harness.git
cd deepseek-harness
pnpm install && pnpm run build
pnpm dsh web
3. Pointing Models to Our Gateway
Open the Web UI → Settings → Models → Add a custom provider, and enter the following details:
Provider ID : jizhi
Base URL : https://www.relay-api.com
API Protocol: OpenAI Compatible(openai-completions)
API Key : sk-your-key
Model : claude-sonnet-5
(Use https://www.relay-api.com/v1 for OpenAI endpoints and https://www.relay-api.com/v1beta for Gemini endpoints; you can add multiple providers as needed.)
Configuration via settings.yaml
llm-pi-ai:
providers:
jizhi:
apiKeyEnv: JIZHI_API_KEY
api: openai-completions
baseURL: "https://www.relay-api.com"
models:
- id: claude-sonnet-5
After saving, select the model in the model picker to begin your session.
4. Selecting a Workspace and Running Tasks
Once started, click Choose workspace and select the project directory where you launched dsh. After selecting the workspace, you can start a new session, for example, by asking to "Summarize this repository and list the main packages." The framework will ask for your consent when authorization is required.
5. Troubleshooting
| Issue | Solution |
|---|---|
| 401 | Invalid API key; check your key, or re-enter it on the Models page and ensure the corresponding environment variable is exposed. |
| UNKNOWN_MODEL | Model not configured or mismatched; add the exact slug to the model list in your custom provider settings. |
| Gateway Refusal | If the request structure is not fully compliant with OpenAI standards, you can configure compat.supportsDeveloperRole: false and compat.maxTokensField: max_tokens in the route settings. |
Security Tip: Do not commit sk- keys to public repositories; it is recommended to reference them via environment variables. Be mindful of your balance and usage when running large-scale agent tasks.
