Introduction

The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When building long-context agents or tasks that require deep reasoning, it is usually necessary to integrate models that support 1M context windows and structured thinking capabilities. dsh-llm-longcat is an adapter plugin designed for this purpose. It connects LongCat-2.0 to the DSH LLM seam, providing long-context processing, thinking-mode traceability, and native tool-calling capabilities.

What It Is

dsh-llm-longcat is a DeepSeek Harness plugin developed by maintainer ffyuuu. It acts as a model provider, connecting the LongCat-2.0 model. This plugin addresses the need to directly use 1M-context models within the Harness ecosystem, parse model thinking chains, and handle tool-calling parameters.

Core Features

The plugin implements the following core capabilities:

  • Thinking mode: Recognizes the reasoning_content field in LongCat and converts it into the Harness ReasoningBlock structure, so that the model’s thinking process can be displayed in the UI or logs.
  • Tool calling: Provides full function-calling support and keeps arguments as raw JSON strings in end-to-end transmission.
  • Multi-turn conversation: Replays reasoning_content in turns that include tool calls, ensuring that the thinking chain is not lost during complex interactions.
  • Streaming: Uses the SSE protocol for transmission and strictly follows the order required by Harness, where usage precedes finish.
  • Credential seam: Keys are not written to configuration files; instead, they are resolved per request through ctx.credentials or environment variables.

Installation and Enablement

Installing the plugin requires the DSH plugin management commands. The installation script runs on the local machine, not within the sandbox of the DSH process.

dsh plugin --profile default add github:ffyuuu/dsh-llm-longcat

After installation, you need to configure the API key. It is recommended to set it via an environment variable to avoid key leakage:

export LONGCAT_API_KEY=...

If you need to pin a specific version to prevent future code changes from affecting execution, you can use a commit hash:

dsh plugin --profile default add github:ffyuuu/dsh-llm-longcat#3dcb3b1b5870ba52baab053453bdbb28826e5f13

Typical Usage

Add the plugin definition to the DSH configuration file (such as $DSH_HOME/settings.yaml). The default apiKeyEnv is LONGCAT_API_KEY, and baseURL is optional.

- id: llm-longcat
  name: dsh-llm-longcat
  config:
    apiKeyEnv: LONGCAT_API_KEY
    baseURL: https://api.longcat.chat/openai/v1
    thinking: enabled
    reasoningEffort: high
    maxTokens: 131072
    defaultContextWindow: 1048576
    streamIdleTimeoutMs: 300000
    retryPolicy:
      mode: normal
      maxRetries: 3
    models:
      - id: LongCat-2.0
        contextWindow: 1048576

The thinking field in the configuration controls whether reasoning mode is enabled. reasoningEffort currently supports only two binary levels: high and off.

Use Cases and Notes

  • Use cases: Tasks that require processing million-scale token contexts, scenarios where Harness needs to display the model’s internal chain of thought, and conversations involving complex tool calls.
  • Limitations:
    • No image input: LongCat-2.0 supports only the text->text modality, and the plugin will reject image content.
    • No stop sequences: The stop parameter is not in supported_parameters, and passing this parameter will cause an error.
    • Binary reasoning: It does not support low/medium/high reasoning intensity levels; it only supports enable or disable.
  • Installation notes:
    • The plugin installation script runs outside the sandbox, so you need to ensure trust in the source code and the license (MIT).
    • In some environments, installing Harness itself may encounter upstream dependency issues, such as a dsh-typert-protocol version mismatch or npm heap memory exhaustion. This is usually because @deepseek-ai/dsh released 0.1.0-rc.8 while the dependent package remained at 0.1.0-rc.7. This can be resolved by locking the version with npm overrides, but it does not affect the plugin’s own compatibility.

Summary

dsh-llm-longcat provides DeepSeek Harness with integration capabilities for long-context models (1M context) and thinking modes. By handling reasoning_content and supporting native tool calls, it completes the Harness ecosystem for complex reasoning tasks. For more details, see the GitHub repository or the community directory.