DSH Plugins Marketplace

DSH Plugins

Plugins

/

Models & Providers

/

dsh-relaycheck

d

dsh-relaycheck

Manifest valid

Adds a relay_check tool that runs relaycheck against an LLM API relay to detect model swaps, misreported usage, truncated context and injected prompts; keys are read from environment variables.

hasBundlePatch

dsh-relaycheck

A DeepSeek Harness plugin that gives the agent a relay_check tool: ask it "is this relay really serving the model it claims?" and it runs relaycheck against the relay and reports a verdict.

中文:给 dsh 的 agent 加一个 relay_check 工具,用 relaycheck 检测 LLM API 中转是否货真价实(模型是否被调包、计费是否虚报、上下文是否被截断、是否注入隐藏提示词)。

What it checks

relaycheck runs four groups against the relay and compares the answers with a reference fingerprint:

GroupWhat it catches
identitymodel swap: 24 probes × N samples, permutation χ² per probe, Cauchy-combined p-value
protocolwrong or missing protocol fields for the claimed API
billingreported usage vs. the real token count; hidden prompt injection
contexttruncated context window (needle test)

The verdict is consistent, inconsistent or inconclusive. It is a statistical test, not proof.

Install

dsh plugin --profile web add dsh-relaycheck

Requires Node ≥ 24.9 (the same as dsh). Tested with dsh 0.2.1-rc.5.

Configure

The model can only name a configured target. Base URLs and key variable names live in your profile config, so a prompt injection cannot point your key at another host. Keys are read from environment variables only.

# $DSH_HOME/profiles/web/cordis.patch.yml
- id: relaycheck
  config:
    targets:
      myrelay:
        baseUrl: https://relay.example.com
        model: claude-sonnet-4-5      # optional; empty = the model of the calling session
        api: auto                     # auto | anthropic | openai | responses
        keyEnv: RELAY_KEY             # name of the env var holding the key
        provider: myrelay             # dsh provider id this relay backs (optional)
    samples: 16
    requireApproval: true             # ask before each run; a run spends relay tokens
    allowDeep: false                  # --deep costs about 100k extra input tokens
export RELAY_KEY=sk-...
dsh web

When provider matches the provider of the current session, the agent can call relay_check with no arguments to test "the relay I'm using now", with the session's model.

OptionDefaultMeaning
targets{}named relays the agent may check
defaultTarget—used when the call names none and no provider matches
samples16samples per identity probe
probesidentity,protocol,billing,contextgroups to run
allowDeepfalselet the agent request --deep
requireApprovaltrueapproval prompt before every run
langenen or zh for the summaries
timeoutSeconds600kill the run after this long

The tool

relay_check({ target?, model?, probes?, deep? }) returns:

{
  "target": "myrelay", "host": "relay.example.com", "model": "claude-sonnet-4-5", "api": "anthropic",
  "verdict": "inconsistent", "headline": "...", "pValue": 0.0003, "calibrated": true,
  "exitCode": 1,
  "groups": [{ "id": "identity", "status": "fail", "summary": "..." }],
  "usage": { "inputTokens": 41200, "outputTokens": 3900, "requests": 412 },
  "durationMs": 95000
}

pValue and injectedTokens are left out when relaycheck reports none. The model sees a short text summary of the same facts. The key never appears in the result or in error messages.

Cost

A default run sends a few hundred short requests (24 probes × samples, plus protocol, billing and context checks) and takes one to several minutes. That is why requireApproval is on by default.

Development

npm install
npm test     # unit tests + end-to-end runs against relaycheck's local mock relays (honest and model-swapping); no real API or key

License

MIT

Comments

Loading…

Similar plugins

dsh-llm-balance

Multi-provider LLM API balances under the chat input, with presets for DeepSeek, OpenRouter and SiliconFlow.

Tools & CapabilitiesModels & ProvidersManifest valid

★ 0

dsh plugin --profile web add dsh-llm-balance

Multi-provider LLM API balances under the chat input, with presets for DeepSeek, OpenRouter and SiliconFlow.

Tools & CapabilitiesManifest valid

★ 0

dsh plugin --profile web add dsh-llm-balance

Governs multi-model access, monthly credits, manual/quality/credit/auto routing, failure rerouting, and usage auditing for DSH.

Models & ProvidersManifest valid

★ 0

dsh plugin --profile web add dsh-llm-governor

by BrambleXu

Reusable Markdown prompt profiles for DeepSeek Harness with per-turn model selection, argument substitution, and state restoration.

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 1

MIT

TypeScript

Oct 10, 2026

dsh plugin --profile web add dsh-prompt-profile

Rule-based multi-provider model routing for DeepSeek Harness with pre-first-token failover, cooldown circuit-breaking, usage accounting, and a status API.

Models & ProvidersManifest valid

★ 0

dsh plugin --profile web add @botton/dsh-model-router

by yangbobo2021

DSH Skill for discovering and safely authoring Relay Monitor Bundles.

Tools & CapabilitiesManifest valid

★ 0

MIT

JavaScript

Sep 16, 2026

dsh plugin --profile web add relay-dsh-plugin-monitor-author