DeepSeek Harness
DeepSeek Harness (dsh) is DeepSeek AI’s open-source agent harness. Register ApiGo as a custom llm-pi-ai provider so Harness uses your ApiGo key, model catalog, usage controls, and call logs.
DeepSeek Harness is currently in Developer Preview and may introduce compatibility-breaking changes.
Prerequisites
- Node.js installed
- An ApiGo API key from Workspace → API Keys
- A current model slug from the Model Catalog
1. Store the ApiGo key
Create ~/.dsh/.credentials.yaml:
APIGO_API_KEY: sk-apg-...
Restrict access to the Harness directory and credential file:
chmod 700 ~/.dsh
chmod 600 ~/.dsh/.credentials.yaml
Keep the key out of settings.yaml, project files, shell history, and Git. APIGO_API_KEY is the credential name referenced by the provider configuration below.
2. Register ApiGo as a provider
Create or edit ~/.dsh/settings.yaml:
ui-onboarding:
welcomeNoticeVersion: 2026-08-13.1
agent-presets:
default: code
llm-pi-ai:
providers:
apigo:
displayName: apigo
apiKeyEnv: APIGO_API_KEY
api: openai-completions
baseURL: https://api.apigo.ai/v1
models:
- id: deepseek-v4-flash
name: deepseek-v4-flash
- id: deepseek-v4-pro
name: deepseek-v4-pro
agent-default-model:
provider: apigo
model: deepseek-v4-flash
This configuration is required because ApiGo is a custom provider route. Setting DEEPSEEK_BASE_URL alone leaves Harness on its native deepseek-official route and does not select the ApiGo provider.
Use only model slugs currently shown in the ApiGo catalog. Change both the provider’s models list and agent-default-model.model when selecting another model.
3. Start Harness
Run the Web UI:
npx @deepseek-ai/dsh web
Open http://127.0.0.1:3080, create a session, and confirm that the selected provider and model are apigo / deepseek-v4-flash.
For a one-shot terminal check:
npx @deepseek-ai/dsh --profile headless \
'Reply with exactly APIGO_HARNESS_OK and nothing else.'
A successful setup prints:
APIGO_HARNESS_OK
Then confirm the request in Workspace → Call Logs.
Configuration reference
| Setting | Value | Purpose |
|---|---|---|
| Credential file | ~/.dsh/.credentials.yaml |
Stores the ApiGo key outside general settings |
| Credential name | APIGO_API_KEY |
Matches apiKeyEnv in the provider profile |
| Provider route | apigo |
Harness provider ID selected by agent-default-model |
| API protocol | openai-completions |
Uses ApiGo’s OpenAI-compatible Chat Completions API |
| Base URL | https://api.apigo.ai/v1 |
ApiGo OpenAI-compatible gateway prefix |
| Default model | deepseek-v4-flash |
Exact ApiGo model catalog slug |
Troubleshooting
| Symptom | Fix |
|---|---|
MISSING_CREDENTIAL |
Confirm ~/.dsh/.credentials.yaml contains APIGO_API_KEY and is valid YAML |
| 401 / 403 | Replace the key with an active ApiGo key and check its workspace permissions or spend cap |
UNKNOWN_MODEL |
Add the exact ApiGo slug under llm-pi-ai.providers.apigo.models |
Requests still use deepseek-official |
Set agent-default-model.provider to apigo and restart Harness |
workspace_tpm_exceeded |
Agent prompts and tool loops can use multiple large requests; raise the Workspace TPM limit or wait for capacity before retrying |
| No request in Call Logs | Confirm the Base URL includes /v1 and the active model shows provider apigo |
