Overview
The TokenLab DeepSeek Harness bundle combines two integration surfaces:- three exclusive model-provider routes for OpenAI Responses, Anthropic Messages, and OpenAI Chat Completions;
- the TokenLab MCP full profile for model discovery, images, video, music, 3D, audio, files, embeddings, rerank, translation, and asynchronous tasks.
@tokenlabai/dsh-provider. It targets DeepSeek Harness 0.1.1-rc.2 and the current 0.1.x plugin contract.
This page is release-ready documentation for the package. Publish the npm package and read it back before deploying this page or submitting its marketplace listing.
Install
Store the key in the project.env or Harness-home .env:
Native endpoint routing
DeepSeek Harness configures the wire protocol at the provider-route level. The TokenLab bundle therefore registers three provider entries and assigns every public chat model to exactly one entry.
The checked-in model snapshot is generated from
GET /v1/models plus GET /v1/models/{id}. It does not infer protocol support from a model-name substring or an internal provider route.
Current Harness custom providers support
openai-responses, anthropic-messages, and openai-completions. They do not expose a configurable Gemini-native protocol. Gemini models therefore use their declared Chat Completions compatibility path in Harness; applications that require native Gemini generateContent should call /v1beta/models/{model}:generateContent from a compatible client.Multimodal and developer tools
The bundle starts the pinned@tokenlabai/mcp-server locally over stdio through the official Harness MCP bridge. The default full profile exposes 80 tools under mcp__tokenlab__....
The package uses the portable schema mode for provider compatibility while the MCP server validates calls against the complete generated OpenAPI contract.
Asynchronous media
Video, music, and 3D create tools return asynchronous tasks. Image tools may return either a completed result or a task, depending on the selected model.- Inspect
delivery.modein the create-tool result. - For
sync, consume the returned media result directly. - For
async, passdelivery.task_idtotokenlab_wait_task. - Use its
status, completeresponse, andresult_urlsfields. - A wait timeout returns the latest nonterminal status so polling can resume safely.
tokenlab_wait_task is read-only. It forwards caller cancellation through every request and delay, limits transient retries, respects the overall timeout, and uses task status—not optional progress—as terminal truth. Use the generated cancellation tool only when cancellation is intended and supported.
Configuration
Use
core instead of full when a smaller recurring tool-schema cost matters more than the broader developer surface.
Verify
After restart:- Confirm the model picker shows the three TokenLab providers.
- Confirm each model ID appears on only one provider route.
- Ask the agent to call
mcp__tokenlab__list_models; a non-empty result proves MCP startup, tool discovery, and TokenLab catalog reachability. - With a test key, run one Responses model, one Messages model, and one Chat model, and verify the expected endpoint path in request logs.
- Submit one low-cost async media task, wait for a terminal status, and verify the returned media URL.
Existing llm-pi-ai settings
Harness currently has one shared llm-pi-ai settings section. A provider configuration saved through the Models page has higher precedence than bundle defaults and can replace the three TokenLab routes. If you already use that section, merge the tokenlab-responses, tokenlab-messages, and tokenlab-chat blocks from the package’s cordis.patch.yml into its providers map.
Security
- Keep
TOKENLAB_API_KEYin a trusted environment or secret store; never commit it. - The MCP server runs locally with the same Node executable as Harness, without a shell or hosted MCP intermediary.
- Full-profile tools include billable generation and destructive operations. Keep Harness approvals enabled for those calls.
- Treat model text, URLs, files, and generated media as untrusted external content.
- Review the pinned MCP version before upgrading it.