Introduction

DeepSeek Harness (DSH) supports accessing DeepSeek models through relays (third-party OpenAI-compatible gateways). The official adapter llm-deepseek exposes four reasoning levels in the Web UI: Off / Low / High / Max. However, relays usually use llm-pi-ai and lack these options, and their thinking parameter formats are incompatible. dsh-deepseek-relay solves these issues by registering an independent OpenAI adapter route, without modifying the harness core.

Core Features

  • Exposes four reasoning levels: Off / Low / High / Max.
  • Automatically serializes thinking parameters according to the relay dialect.
  • Supports overriding wire values per model.
  • Supports declaring vision capabilities per model.
  • A single plugin instance can attach multiple relay routes.
  • Takes effect as a pure plugin.

Installation and Activation

The plugin provides two installation methods.

  1. Run from Source
    Execute the following command under the root directory of the deepseek-harness repository:
   pnpm dsh web --patch ./dsh-deepseek-relay/cordis.yml
  1. Install as a Bundle
   dsh plugin --profile demo add ./dsh-deepseek-relay

After installation, configure providers, models, and supportsVision in the Web UI model settings. The API Key must be set via the environment variable RELAY_API_KEY, or entered manually in the Web UI.

Typical Usage

Configure relay information in cordis.yml:

- insert:
    - id: dsh-deepseek-relay
      name: '/绝对路径/deepseek-harness/dsh-deepseek-relay/src/index.ts'
      config:
        providers:
          my-relay:
            baseURL: https://your-relay.example.com/v1
            apiKeyEnv: RELAY_API_KEY
            thinkingFormat: auto
            models:
              - id: deepseek-v4-flash
              - id: deepseek-v4-flash-vision-exp
                supportsVision: true

Notes

  • Upgrade Note: Models that do not explicitly declare supportsVision: true in old configurations do not support vision by default. After upgrading, manually add this field.
  • Input Type: The plugin supports text input by default. Image input requires manually declaring supportsVision: true to avoid errors.
  • Relay URL: If the gateway requires /v1, the full path must be included in baseURL.
  • Disclaimer: This plugin is a third-party, unofficial adaptation layer and does not guarantee compatibility with all gateways.

Conclusion

This plugin provides DSH users with reasoning-level control when using DeepSeek models through relays.