Skip to Content

DeepSeek Harness (gateway)

Route DeepSeek Harness ’ LLM calls through the Respan gateway for automatic logging, caching, and model switching. dsh supports custom OpenAI-compatible and Anthropic-compatible providers, so only your RESPAN_API_KEY is needed.

Paste this into your coding agent:

Help me set up the Respan gateway with the DeepSeek Harness integration. Follow https://www.respan.ai/docs/integrations/gateway/deep-seek-harness.md

Setup

Install dsh

Terminal
npm install -g @deepseek-ai/dsh

Add Respan as a provider

Edit $DSH_HOME/settings.yaml (defaults to ~/.dsh/settings.yaml) and add a provider under the llm-pi-ai section:

YAML
llm-pi-ai: providers: respan: apiKeyEnv: RESPAN_API_KEY api: openai-completions baseURL: https://gateway.respan.ai models: - id: gpt-4o - id: claude-sonnet-4-5-20250929

apiKeyEnv is the name of the environment variable that holds your key. Export it in your shell profile:

Terminal
export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"

You can do the same from the web UI: run dsh web, open Settings, then Models, choose Add a custom provider, and fill in the provider ID respan, the base URL https://gateway.respan.ai, the openai-completions protocol, your key, and at least one model.

No separate provider key needed. The Respan gateway handles provider authentication.

Make Respan the default model

dsh’s profiles default to the deepseek-official route. Override the default model with a patch overlay. Save this as ~/.dsh/respan.yml:

YAML
- id: agent-default-model config: provider: respan model: gpt-4o

Run dsh

Terminal
dsh --profile tui --patch ~/.dsh/respan.yml

For a one-shot, non-interactive run:

Terminal
dsh --profile headless --patch ~/.dsh/respan.yml "your task"

All LLM calls now route through Respan.

Switch models

Add more entries under models and change model in the patch overlay (or pick a model in the UI) to use any of the 1000+ models available through the gateway.

gpt-4o claude-sonnet-4-5-20250929 gemini/gemini-3.5-flash

See the full model list .