dshbase

Plugin directory / Network / dsh-switch

dsh-switch

Verified · install-tested on dsh dongsheng123132

✓ Actively maintained Builds on 1 official DSH packages

View on GitHub ↗ ← Back to plugin directory

3Stars
0Forks
0Open issues
JavaScriptLanguage
2026-08-14Last push
Cross-platformPlatform

What it does

Evidence-first model control plane for DeepSeek Harness

✅
Our take
Works — verified, early-stage project

Evidence-first model control plane for DeepSeek Harness It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-switch

CI
MIT license
Node.js 22+
Awesome DSH Plugins

Evidence-first model control plane for DeepSeek Harness.

中文

dsh-switch does two deliberately separate jobs:

  1. The DSH bundle exposes model-facing tools that inspect registered provider routes, validate an exact provider/model through the official ctx.llm seam, and save the default for new sessions through ctx.agentDefaultModel.
  2. The standalone CLI probes OpenAI-compatible /models endpoints and reports reachability, HTTP status, latency, model count, and whether a credential environment variable is configured.

It does not intercept model requests, implement another OpenAI adapter, or silently reroute an active session. Projects such as dsh-polyglot and dsh-llm-fallbacks own adapter/fallback behavior; this project is the observable control plane around routes DSH already knows.

Install the DSH bundle

Pin a reviewed commit when installing from GitHub:

dsh plugin --profile web add github:dongsheng123132/dsh-switch#<commit>
dsh --profile web --dump-config

The bundle ships JavaScript and has no install/build lifecycle script.

Tools

dsh_switch_status({ includeModels? })

  • shows the default selection used by newly created sessions;
  • lists registered provider routes;
  • optionally asks each adapter for its advertised models;
  • performs no provider network health request itself.

dsh_switch_default({ provider, model, reasoningEffort?, expectedProvider?, expectedModel? })

  • validates the exact route with ctx.llm.resolveModelInfo();
  • rejects an unsupported reasoning effort;
  • supports an optimistic-concurrency expectation pair;
  • saves through ctx.agentDefaultModel.saveSelection();
  • reads the value back and fails if the write is not observable;
  • affects new sessions only. Existing sessions keep the route recorded in their logs.

Probe provider endpoints

Copy providers.example.json to a private local file such as providers.json. Reference secrets by environment-variable name—never place keys in JSON.

node bin/dsh-switch.mjs validate --config providers.json
node bin/dsh-switch.mjs check --config providers.json
node bin/dsh-switch.mjs best --config providers.json

JSON output:

node bin/dsh-switch.mjs check --config providers.json --json

Example output:

✓ deepseek-official          83.4 ms  HTTP 200, 2 models  credential:configured
✗ local-vllm                 1.2 ms  network-error  credential:not-required

The probe sends GET <baseURL><modelsPath>. It does not send a chat completion and therefore does not consume inference tokens. A successful /models response proves endpoint reachability, not end-to-end generation correctness.

Security and evidence boundaries

  • apiKey fields and credentials embedded in URLs are rejected.
  • Output contains only configured, missing, or not-required; secret values never enter results.
  • A 401/403 endpoint is reachable but not healthy.
  • DSH tool switching validates registered adapter metadata, not live provider I/O.
  • No automatic fallback or cost-based routing is enabled in v0.1.

Development

npm test
npm run check

The plugin smoke test requires the official DSH runtime packages to be resolvable:

npm run smoke:plugin

License

MIT © 2026 hfshfg

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-switch for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:dongsheng123132/dsh-switch

Headless (CLI) profile:

dsh plugin --profile headless add github:dongsheng123132/dsh-switch

Test report

Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.

When to use it

Give the agent network access — requests, APIs, proxies, or protocols — so it can reach external systems.

Who it's for

Users whose tasks touch the network — calling APIs, fetching resources, or talking to remote services.

For developers — extending it

Adapters and request shaping are the seams — add protocols, auth handlers, retries, and endpoint abstractions.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Network

Browse all 7797 plugins →