TokenLab

Coding Tools

DeepSeek Harness

Configure a TokenLab model in Harness, verify a request, and choose MCP, Skills, or the provider bundle

Choose the connection you need

To use TokenLab as the agent's main model, add a custom provider in the Harness Web UI. This works independently of the optional TokenLab provider bundle. Add MCP tools for media and other APIs, or a Skill for API instructions; neither changes the main model by itself.

Harness is a developer preview. These Web UI steps were checked against the official documentation and the published @deepseek-ai/dsh 0.1.5-rc.3 package on September 27, 2026. The bundle instructions below target this version; check compatibility with other Harness releases separately.

Give this task to your agent

Read https://tokenlab.sh/docs/en/integrations/deepseek-harness and check my installed version and operating system.
Confirm whether I need TokenLab as the main model, MCP tools, or API Skills.
Preserve existing accounts, provider configuration, and permissions; explain how to restore changed settings.
Keep API keys local; do not ask me to paste them into chat. I will enter the key locally and perform required UI steps.
Explain the cost of a small verification request. Only after I explicitly choose that test, help run it and match the TokenLab request record.

Start Harness

Use the Node CLI on macOS, Linux, or Windows with a supported Node release; Node 24 LTS is a suitable starting point. From your project directory, run this in a terminal or PowerShell:

node --version
npx @deepseek-ai/dsh@0.1.5-rc.3 web

Open the local URL printed by the command. In a fresh Web UI, use Choose workspace to add and select your project directory before sending a message. These commands use the web profile; the Electron application's desktop profile is not managed by this CLI workflow. See the official startup guide and Web UI guide.

Configure one TokenLab provider

  1. Open Settings → Models → Add a custom provider. Preserve any existing providers and permissions.
  2. Enter a lowercase Provider ID, such as tokenlab-chat, and choose one protocol and its matching Base URL below. Each provider uses one protocol.
  3. Enter your TokenLab API key in the local form. Harness stores UI-managed keys in $DSH_HOME/.credentials.yaml; the settings document holds a reference. Do not send the key in chat or commit it.
  4. Add one current model ID from TokenLab Models. Check its tokenlab.accepted_request_formats in the model detail API, rather than guessing support from its name.
  5. Save the provider, select its model, and start a new session. An existing session that has already sent a request retains its recorded model.
Provider ID exampleHarness API protocolBase URLRequired public request format
tokenlab-chatopenai-completionshttps://api.tokenlab.sh/v1openai_chat_completions
tokenlab-responsesopenai-responseshttps://api.tokenlab.sh/v1openai_responses
tokenlab-messagesanthropic-messageshttps://api.tokenlab.shanthropic_messages

For a first text request, a currently available gpt-4.1-mini entry can use the Chat row. Fetch available models → Add selected can help populate a custom provider, but listing success does not verify protocol support or a billable request; save the provider afterward. Enter the ID manually if discovery is unavailable.

Harness does not offer a Gemini-native custom-provider protocol here. Use Chat only when that model's details list Chat Completions as an accepted request format. Image input and reasoning controls can need additional settings.yaml fields; follow Harness provider configuration and the selected model's supported fields before enabling them.

Verify one small request

In the new session, send:

Reply only with TOKENLAB_CONNECTION_OK. Do not use tools or modify files.

This request is billable. Check the reply and the matching model, time, and status in TokenLab Requests. Stop after this text check; testing three protocols or generating paid media is not required to establish the first connection. A model listing or MCP discovery alone does not validate the key's generation access.

Optional: the TokenLab bundle

@tokenlabai/dsh-provider@0.1.5 targets Harness 0.1.5-rc.3. Use the native custom-provider steps above to configure one model, or install the bundle for its preset model routes and tools.

The bundle contains a fixed snapshot of 136 public chat models checked on September 27, 2026: Responses 27, Messages 10, and Chat 99. Each model appears on exactly one route. It pins @tokenlabai/mcp-server@0.6.24 and includes the separate tokenlab_wait_task tool. Installing this version does not refresh the model catalog. Check IDs against the live catalog and add newer models through a custom provider when needed.

For an existing compatible Harness installation, first ensure pnpm is on PATH. Use the same dsh executable/version and profile for installation and startup; if you launch through npx, replace dsh below with that same versioned launcher:

dsh --version
pnpm --version
dsh plugin --profile web add --workspace-root @tokenlabai/dsh-provider@0.1.5

Before starting that profile, set the key in the launch environment or its .env file:

TOKENLAB_API_KEY=sk-your-tokenlab-key

Harness reads .env in the directory where you launch it and in $DSH_HOME (normally ~/.dsh); an inherited environment variable takes precedence. Selecting a workspace later does not select a different .env. Keep that file out of git and restart after changing it. A key saved for a custom provider in the UI does not automatically supply this bundle's TOKENLAB_API_KEY.

Restart the same profile, then inspect its model and tool lists. For headless, install into and launch headless instead of web; installing into one profile does not configure the other.

Harness 0.1.5-rc.3 merges saved llm-pi-ai.providers by provider key. Providers with different keys coexist. Saved tokenlab-responses, tokenlab-messages, or tokenlab-chat entries override the corresponding bundled route; review those entries when upgrading an older catalog. Preserve the other providers and models in $DSH_HOME/settings.yaml; do not replace the whole settings document with the Cordis patch.

Public model details identify reasoning capability but do not enumerate supported effort values per model. The bundle therefore leaves reasoningEfforts undeclared. Harness does not offer effort levels for these custom routes; this does not disable server-side reasoning. If you configure reasoningEfforts yourself, use only separately verified values on the model entry in its provider’s models list and preserve the other models. Reasoning capability alone does not establish support for xhigh or max.

The bundle defaults to TOKENLAB_MCP_TOOL_PROFILE=core with 32 MCP tools and TOKENLAB_MCP_SCHEMA_MODE=portable. Choose catalog for discovery only (6 tools), or full for all 89 tools, including additional response lifecycle, batch, Seedance asset/group, and worlds operations. The separate tokenlab_wait_task poller remains available in every profile and is not included in these MCP counts. TOKENLAB_API_BASE and TOKENLAB_ANTHROPIC_BASE_URL default to https://api.tokenlab.sh; TOKENLAB_OPENAI_BASE_URL defaults to https://api.tokenlab.sh/v1.

For bundle media tools, inspect delivery.mode: consume complete output directly; pass an async result's delivery.task_id to tokenlab_wait_task and read its terminal status, response, and result_urls. A wait timeout is not a completed task. Keep approvals for billable or destructive tools. See async tasks.

To remove the bundle, use the same launcher and profile, then restart:

dsh plugin --profile web remove --workspace-root @tokenlabai/dsh-provider

If it fails

  • The composer is disabled: select both a workspace and a model.
  • MISSING_CREDENTIAL or 401: check the selected provider's credential. For bundle tools, check TOKENLAB_API_KEY in the launch environment; a UI-saved model key is a separate setting.
  • UNKNOWN_MODEL or a retired ID: check the live catalog, configure the current exact ID, then create a new session. Reinstalling bundle 0.1.5 does not update its snapshot.
  • The URL is reachable but generation fails: compare the protocol, Base URL, and model's accepted formats. Do not remove history, tools, or image input merely to turn an error into a successful check.
  • dsh or pnpm is missing: use the versioned npx launcher above for Harness; install pnpm before using plugin commands. A plugin installation failure is not an API-key failure.

MCP and Skills are separate choices

A manual custom provider does not install tools. Follow the TokenLab MCP guide if you need callable API tools without the bundle, and check discovery before any generation.

For TokenLab Skills, keep the complete skill folder at .dsh/skills/tokenlab-api-integration/ under the project root, including SKILL.md and referenced files. Harness also discovers .agents/skills/. These instructions do not install a provider, MCP server, or key. The official filesystem Skills reference defines the supported locations.

Jev / System One & Webhooks

Use mcp__tokenlab__evaluate_decisions in core or full for Jev (POST /v1/systemone). Discover category=decision and inspect the model first. These are synchronous decisions, not chat models or asynchronous tasks; do not use the model picker or tokenlab_wait_task.

Webhook management requires full and a separate TOKENLAB_MANAGEMENT_TOKEN=mt-... in the launch environment, explicitly passed to MCP by the bundle. An inference key cannot substitute for it. Management tokens have workspace-level authority beyond webhooks; registering a webhook does not make Harness a receiver.

On this page