dsh (DeepSeek Harness)
dsh is DeepSeek's coding agent (npm package @deepseek-ai/dsh). It supports custom providers, so you can connect it to this service through the OpenAI Chat Completions–compatible protocol.
- Protocol:
openai-completions(OpenAI Chat Completions) - Base URL:
https://tokencount.aigemini.org/v1(includes/v1)
WARNING
dsh is still a developer preview, and its config format may change between releases. If the fields below don't match your version, use the config written by the dsh web UI (Option 1) as the reference.
Prerequisites
dsh runs through npx, so you need Node.js and npm. dsh requires a recent Node release; the latest Node.js 24 LTS is recommended.
- Node.js downloads:
https://nodejs.org/en/download - On macOS with Homebrew:
brew install node
Verify your environment:
node -v
npm -vLaunch
No global install is needed. Start the web UI with npx:
npx @deepseek-ai/dsh webThen open http://127.0.0.1:3080 in your browser. The web UI only listens on the local machine.
You can also run a single task from the command line without the web UI:
npx @deepseek-ai/dsh --profile headless "list the files in this directory"Configure
Option 1: Web UI (recommended)
- Open
http://127.0.0.1:3080and go to Settings → Models. - Click Add a custom provider and fill in:
| Field | Value |
|---|---|
| Provider id | codex_proxy (any name; it can't be renamed later) |
| Base URL | https://tokencount.aigemini.org/v1 (includes /v1) |
| Protocol | OpenAI Chat Completions |
| API key | Your API key |
- Click Fetch available models, or add a model ID manually, such as
gpt-6-astra. - Select the model in the model picker. The model you pick becomes the default for new sessions.
Option 2: Config file
Edit ~/.dsh/cordis.patch.yml (applies to every profile; to change a single profile, edit ~/.dsh/profiles/<profile>/cordis.patch.yml instead):
- id: agent-default-model
name: "@deepseek-ai/dsh-agent-default-model"
config:
provider: codex_proxy
model: gpt-6-astra
- id: llm-pi-ai
name: "@deepseek-ai/dsh-llm-pi-ai"
config:
providers:
codex_proxy:
displayName: Codex Proxy
apiKeyEnv: CODEX_PROXY_API_KEY
api: openai-completions
baseURL: https://tokencount.aigemini.org/v1
models:
- id: gpt-6-astra
name: gpt-6-astra
- id: web-search-deepseek
disabled: true
- id: web
disabled: true
- id: tool-web
disabled: trueNotes:
- Set
baseURLtohttps://tokencount.aigemini.org/v1. It must include/v1, otherwise you'll get a 404. - Use the model IDs returned by
GET /v1/models. You can list several. - The last three entries disable dsh's built-in web search plugins. They call DeepSeek's own API directly and fail with
MISSING_CREDENTIALwithout aDEEPSEEK_API_KEY. Remove them if you have an official DeepSeek key.
Then put your API key in ~/.dsh/.credentials.yaml:
CODEX_PROXY_API_KEY: codex_your_api_keyand restrict the file permissions:
chmod 700 ~/.dsh
chmod 600 ~/.dsh/.credentials.yamlAlternatively, skip the file and use an environment variable (the name must match apiKeyEnv):
export CODEX_PROXY_API_KEY="codex_your_api_key"dsh watches its config files, so most changes apply immediately. If they don't, restart dsh.
TIP
The dsh data directory defaults to ~/.dsh. Set DSH_HOME to move it, and adjust the paths above accordingly.
Verify
Print the merged configuration:
npx @deepseek-ai/dsh --profile web --dump-configThen send a message in a session. If you get a reply, the setup is working. Use /model inside a session to switch models.
Troubleshooting
| Error | Cause |
|---|---|
MISSING_CREDENTIAL | No API key found: check .credentials.yaml or that the environment variable name matches apiKeyEnv; or the web search plugins are still enabled |
UNKNOWN_MODEL | The selected model ID isn't in the models list |
| 404 | baseURL is missing /v1, or Protocol isn't OpenAI Chat Completions |
Privacy note
According to community documentation, dsh sends session logs (dsh_session_log) through its DeepSeek adapter by default, even when you use a third-party gateway. To turn this off, disable it under Settings → General, or set enabled: false on the session-log-deepseek plugin.
