Skip to main content
Use this guide to run DeepSeek Harness with CometAPI. DeepSeek Harness loads custom model providers from $DSH_HOME/settings.yaml, which defaults to ~/.dsh/settings.yaml. The configurations on this page were verified with @deepseek-ai/dsh@0.1.0-rc.8. Each route completed a streaming text turn and a file-reading tool loop with one representative model. This scope does not mean that every CometAPI model accepts every API format.
DeepSeek Harness is in Developer Preview and can introduce breaking changes. Pin the tested package version when following this guide, and review the upstream release notes before upgrading.
Official references:

Prerequisites

  • Node.js and npm
  • A CometAPI account with an active API key from the dashboard
  • A model ID from the CometAPI Models page for each API format you plan to use

Understand the provider routes

The api value selects the wire format. The baseURL stops before the operation path that Harness appends.
Replace each your-model-id value independently. Choose a model that accepts the API format of its provider entry.

Configure the providers

1

Confirm the tested Harness version

Confirm the pinned package version before configuring Harness:
The command should print 0.1.0-rc.8.
2

Set your CometAPI API key

Store your key in COMETAPI_KEY before starting Harness:
Set the variable in every shell session that launches Harness. Do not commit API keys to version control.
3

Add the CometAPI providers

Create $DSH_HOME/settings.yaml. If the file already has an llm-pi-ai section, merge these provider entries into its existing providers map:
The example selects the Responses provider by default. Change agent-default-model.provider and agent-default-model.model to select another configured entry.If you prefer the Web UI, start it after exporting COMETAPI_KEY, then use its model settings to add or edit provider entries and select the default model:
The default local address is http://127.0.0.1:3080. YAML remains the direct path for matching the route names and base URLs in this guide.
4

Verify a text turn

Run a one-shot headless task from the project directory you want Harness to use:
A successful run prints COMETAPI_DSH_OK. To check another provider, update agent-default-model and run the command again.
5

Verify file tool use

Create a temporary sentinel file, then ask Harness to read it with a file tool:
Confirm that the final answer is COMETAPI_DSH_TOOL_OK. Run Harness only in a workspace where you accept its file, process, and network access.

Optional route

Harness has one built-in provider route named google. The configuration below points that route at CometAPI, so it replaces the route’s native Google endpoint instead of adding a second Google route. Merge this entry into llm-pi-ai.providers, then select it in agent-default-model:
Do not add an api field to this entry. The built-in google route keeps its native Google protocol and sends streaming requests to /v1beta/models/{model}:streamGenerateContent?alt=sse with x-goog-api-key authentication.

Troubleshooting

Confirm that COMETAPI_KEY is set in the same shell that launches Harness. Restart Harness after changing the environment variable.
Confirm that $DSH_HOME/settings.yaml is valid YAML, the provider is under llm-pi-ai.providers, and the model is listed under that provider’s models. The default DSH_HOME is ~/.dsh.
Use https://api.cometapi.com/v1 as baseURL. Do not append /chat/completions or /responses; Harness appends the operation path.
Use https://api.cometapi.com without /v1 as the Messages baseURL. The Anthropic adapter appends /v1/messages.
Use https://api.cometapi.com/v1beta exactly. Do not append a model path, and do not add an api field to the built-in google route.
Model availability and accepted API formats can differ. Choose a model for each provider entry instead of assuming one model works across all four formats.
DeepSeek Harness is in Developer Preview. Return to @deepseek-ai/dsh@0.1.0-rc.8, then review upstream changes before adapting the configuration to another version.
Last modified on August 20, 2026