Introduction¶
DeepSeek Harness (DSH) supports connecting to multiple model providers. If you want to use a Claude Pro or Max subscription, the usual approach is to integrate through an OAuth flow (such as dsh-provider-login), but this counts usage as third-party usage rather than against the Claude plan quota. dsh-claude-bridge drives the Claude Code CLI through the Agent SDK and uses existing login credentials to count model calls against the Claude plan.
Plugin Purpose¶
dsh-claude-bridge is a DSH plugin maintained by shaneconner. It lets you use a Claude Pro or Max subscription as a model provider for DeepSeek Harness by running the Claude Code CLI to handle inference requests.
Core Features¶
The plugin implements the following features:
* Streaming text and reasoning: Supports streaming output and reasoning processes.
* Tool calls: Supports tool calls in multi-turn conversations.
* Token usage: Includes token statistics for cache reads and writes.
* Finish reason: Returns the model’s finish reason.
* Model listing and resolution: Supports model list querying and resolution.
* Reasoning effort: Supports controlling the reasoning effort level.
* 1M token window: Supports a 1M token context window (must be enabled in configuration).
Installation and Activation¶
Installation requires specifying --profile web, and dsh must be restarted after installation.
dsh plugin --profile web add dsh-claude-bridge
After installation, it registers a provider route named claude-bridge. It does not disable other model providers; instead, it exists alongside them, and the Agent selects one based on configuration.
Configuration¶
The plugin requires that you are already logged in to Claude Code. It does not perform additional authentication; instead, it reads the credentials file written by the Claude Code CLI (located at ~/.claude/.credentials.json or $CLAUDE_CONFIG_DIR/.credentials.json).
Add the following to the configuration file:
- id: claude-bridge
name: 'dsh-claude-bridge'
config:
# 开启 1M token 窗口。默认为 false,开启后若不在 Max 计划下会消耗额外用量
longContext: false
# 指定运行不同的 claude 二进制文件。若不设置,将使用 Agent SDK 捆绑的 CLI
pathToClaudeCodeExecutable: /home/you/.local/bin/claude
# CLI 子进程的工作目录,默认为 Harness 进程的工作目录
cwd: /home/you/project
The plugin overrides certain environment variables and configuration to prevent interference:
* Environment variables: Forces ENABLE_CLAUDEAI_MCP_SERVERS=0 and DISABLE_AUTO_COMPACT=1.
* Configuration loading: The CLI subprocess does not load user, project, or local settings.json files, so it is not affected by hooks, plugins, or skills.
* Environment cleanup: Removes ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_BASE_URL, CLAUDE_CODE_USE_BEDROCK, and CLAUDE_CODE_USE_VERTEX from the environment to prevent a subprocess from accidentally using these variables and causing billing issues.
Notes¶
- Credentials: You must ensure that you have completed login using the
claudecommand in a terminal. - CLI source: The plugin uses the CLI bundled with the Agent SDK, not the
claudecommand on the system PATH. - Cancellation: If the interrupt signal is not acknowledged within 5 seconds, the operation stops waiting; otherwise, the canceled turn continues until completion.
- Concurrency and history: Sessions are keyed by Harness session ID; tool calls go through an in-process MCP server, and results are paired by ID; history is written inline into prompts rather than by restoring CLI session files.
- License: Open source under the MIT License.
Ecosystem Context¶
The DeepSeek Harness plugin ecosystem is independent of official DeepSeek. The plugin repository is https://github.com/shaneconner/dsh-claude-bridge.