Tools & IDE

DeepSeek Harness Configuration

Using ShopAIKey with DeepSeek HarnessAdd ShopAIKey as a custom provider in DeepSeek Harness and use one key for both the OpenAI Chat Completions and Anthropic Messages protocols.

DeepSeek Harness (dsh) is DeepSeek's coding agent, available both in the terminal and as a Web UI. Besides DeepSeek's own models, dsh supports custom providers, so you can point it straight at your ShopAIKey API key.

Worth noting: dsh speaks several API protocols, and ShopAIKey serves the two most common ones with the same key.

Endpoints

dsh API protocolBase URL
openai-completionshttps://api.shopaikey.com/v1
anthropic-messageshttps://api.shopaikey.com

Each provider in dsh accepts exactly one protocol. To use both, create two providers as shown below.

1. Run DeepSeek Harness

code
npx @deepseek-ai/dsh web

This starts the Web UI at http://127.0.0.1:3080 with a login token printed in the terminal. For the terminal build:

code
npx @deepseek-ai/dsh

On the welcome screen dsh offers to sign you into a DeepSeek account. Pick Configure later — you will be using a ShopAIKey key instead.

2. Create the OpenAI-protocol provider

Open Settings (bottom left) → Models tab → Add a custom provider, then fill in:

FieldValue
Provider IDshopaikey
Display nameShopAIKey (OpenAI)
Base URLhttps://api.shopaikey.com/v1
API protocolopenai-completions
API keyyour ShopAIKey key

The Provider ID must be lowercase, start with a letter, and cannot be changed after creation.

Click Fetch available models: dsh calls ShopAIKey's GET /v1/models with the key you just entered and lists every model currently available. Tick the ones you need, for example:

code
deepseek-v4-pro
deepseek-v4-flash

Then click Create provider.

3. Create the Anthropic-protocol provider

Repeat the steps above for a second provider:

FieldValue
Provider IDshopaikey-claude
Display nameShopAIKey (Claude)
Base URLhttps://api.shopaikey.com
API protocolanthropic-messages
API keythe same ShopAIKey key

With anthropic-messages, the Fetch available models button reports:

code
pi-ai protocol "anthropic-messages" has no model listing this build can read;
enter this provider's models by hand

That is a limitation of dsh, not of ShopAIKey. Click Add model and type the model id manually, for example:

code
claude-sonnet-4-6

Then click Create provider.

4. Declaring providers in settings.yaml

To reproduce the setup on another machine, edit ~/.dsh/settings.yaml directly:

code
llm-pi-ai:
  providers:
    shopaikey:
      displayName: ShopAIKey (OpenAI)
      apiKeyEnv: SHOPAIKEY_API_KEY
      api: openai-completions
      baseURL: https://api.shopaikey.com/v1
      models:
        - id: deepseek-v4-pro
        - id: deepseek-v4-flash
    shopaikey-claude:
      displayName: ShopAIKey (Claude)
      apiKeyEnv: SHOPAIKEY_CLAUDE_API_KEY
      api: anthropic-messages
      baseURL: https://api.shopaikey.com
      models:
        - id: claude-sonnet-4-6
          name: Claude Sonnet 4.6

With apiKeyEnv, the key is read from an environment variable instead of being stored in the config file:

code
export SHOPAIKEY_API_KEY="sk-your-api-key"
export SHOPAIKEY_CLAUDE_API_KEY="sk-your-api-key"

Keys entered through the UI are stored separately in ~/.dsh/.credentials.yaml, keyed by Provider ID.

5. Pick a workspace and run a test

Before chatting, dsh requires a working directory: click Choose workspace and point it at your project.

Open the model list at the right edge of the composer — models are grouped by the providers you just created. Pick one and send:

code
Read README.md in the workspace and summarise it in two sentences.

If the agent can call the file-reading tool and answers normally, the setup works. The Usage line under each reply shows how many tokens were spent.

To switch to Claude, just pick a model from the shopaikey-claude provider mid-session — no reconfiguration needed.

6. Notes

  • The two base URLs differ: the OpenAI protocol needs the /v1 suffix, the Anthropic one does not.
  • Model ids must match models ShopAIKey currently serves — check the Models page.
  • On Invalid API Key, verify the key still has credit and has not been revoked.
  • On Model Not Found, try another model from the Models page.
  • After editing settings.yaml by hand, restart dsh to load the new configuration.