Background

DeepSeek Harness (DSH) uses a plugin architecture that allows developers to extend model routing and tool capabilities through configuration. TokenLab provides multimodal models and tool services. This plugin aims to integrate TokenLab’s capabilities seamlessly into DSH, resolving pain points related to model protocol adaptation and asynchronous task handling through native protocol routing and MCP bridging.

What Is This

This is a DeepSeek Harness plugin that provides native protocol routing, multimedia tools, and asynchronous task support for TokenLab. It maintains routing configurations for 145 public chat models and supports MCP tools for image, video, music, and 3D generation.

Core Capabilities

  • Native protocol routing: Automatically routes to /v1/responses, /v1/messages, or /v1/chat/completions based on model declarations.
  • Multimedia and MCP tools: Provides image, video, music, and 3D generation capabilities through MCP bridging.
  • Asynchronous task management: Provides the tokenlab_wait_task tool, supporting task polling, cancellation, and bounded retries.
  • Model and decision support: Integrates 145 public models into the model selector and supports System One decision evaluation.
  • Tool profiles: Provides three MCP tool configuration profiles: core (32 tools), full (89 tools), and catalog (6 tools).

Installation and Activation

Before installing, ensure the following environment requirements are met:
* DeepSeek Harness version 0.1.5-rc.3
* Node.js version 22.19+ or 24+

First configure the TokenLab API key, then install the plugin package.

# 配置环境变量
export TOKENLAB_API_KEY=sk-your-tokenlab-key

# 安装插件(以 web profile 为例)
dsh plugin --profile web add --workspace-root @tokenlabai/dsh-provider@0.1.6

After installation, restart the corresponding profile. Three TokenLab routes will appear in the DSH model selector: TokenLab · Responses, TokenLab · Messages, and TokenLab · Chat.

Typical Usage

The plugin exposes tools through the MCP protocol under the mcp__tokenlab__... namespace. The following is a typical asynchronous multimedia workflow:

  1. List available models:
    mcp__tokenlab__list_models
  1. Create an asynchronous task (for example, create a video):
    mcp__tokenlab__create_video
  1. Poll the task status:
    Check delivery.mode based on the response from create_video. If it is in async mode, use delivery.task_id to call the wait tool:
    tokenlab_wait_task

Configuration Notes

Environment variables can be used to adjust the MCP tool profile and API address:

  • TOKENLAB_MCP_TOOL_PROFILE: Specifies the tool profile, with core as the default. Valid values include core (32 tools), full (89 tools), and catalog (6 tools).
  • TOKENLAB_API_BASE: The API root address for MCP and asynchronous tasks, defaulting to https://api.tokenlab.sh.
  • TOKENLAB_MANAGEMENT_TOKEN: Used by Webhook tools in full mode and must be configured separately.

Use Cases and Notes

  • Use cases: DSH users who need TokenLab’s multimodal models (image, video, 3D) or asynchronous task capabilities.
  • Note: The plugin runs with the permissions of the current DSH process. Be sure to review the source code and license (MIT) before installation. If the pnpm age check fails, you can add a minimumReleaseAgeExclude exclusion in pnpm-workspace.yaml.