dsh-lantern: Exposing Local DSH Models to the LAN via OpenAI / Anthropic Compatible Interfaces

Preface

After configuring providers, login sessions, and quota in DeepSeek Harness (DSH), conversations typically happen only in the local browser. For phones, tablets, or another computer on the same WiFi to use the same set of models, the usual approach is to copy the API Key to each device or log in to the account separately on each one. Maintainer Saretheya’s dsh-lantern (repo Saretheya/dsh-lantern) takes a different path: it runs a small gateway inside the local DSH that is compatible with both the OpenAI and Anthropic protocols, read-only reusing the already-registered model list and upstream login state, so any device on your LAN holding a key you issue can call it. Below we describe what it does, how to install it, and how to connect.

What Is This

LANtern (plugin package name dsh-lantern, current version 0.1.5, MIT license) can be summarized as: exposing all AI models registered in the local DSH to the LAN as OpenAI-compatible (/v1/chat/completions, etc.) and optional Anthropic-compatible (/v1/messages) endpoints.

It does not add upstream accounts, does not modify ~/.dsh/settings.yaml, and does not alter other plugins; the only writes happen under the plugin directory’s data/ (configuration, API key hashes, usage ledger, etc.). The model list comes from DSH’s llm registry via read-only access.

Conceptually, the request path looks like this:

Phone / tablet / another computer  →  LANtern gateway (inside local DSH)  →  Various APIs (existing login session)
        LAN                           your computer                        upstream

The community catalog dsh-lantern page on SkillHub categorizes it as a networking tool; the DSH ecosystem philosophy is “everything is a plugin”. This catalog is an independent community site with no official affiliation with DeepSeek / Hithink.

Core Features

Compatible Endpoints

Endpoint Method Description
/v1/models GET Model catalog (supports ?provider=<slug> filtering)
/v1/models/{id} GET Single model detail
/v1/chat/completions POST OpenAI-compatible main inference (streaming / non-streaming)
/v1/messages POST Anthropic-compatible (disabled by default, can be enabled in settings)
/v1/lantern/health GET Self-check, no authentication required

For OpenAI-style clients, set the Base URL to http://<IP>:<port>/v1; for Anthropic-style clients, set it to http://<IP>:<port>, with the key passed via Authorization: Bearer or x-api-key respectively.

Model Naming

Public model names are forced to <model>@<provider>, e.g., deepseek-v4-pro@buddy. Omitting @provider returns 404, with the response including the available list. Models with the same name may come from multiple providers; the suffix ensures uniqueness and explicit routing.

Access Control and Governance

  • API Key: Generated in the settings panel; the plaintext is shown only once, and the server stores sha256; the default format is sk- + 43 base64url characters.
  • Listen mode: standalone binds its own port (e.g., 0.0.0.0:3081); reuse reuses the DSH port, and the bind address is constrained by the DSH startup parameter --host (with the default 127.0.0.1, it is unreachable from the LAN; you need dsh --host 0.0.0.0 or prefer standalone).
  • Limits: Total concurrency, per-key rpm/tpm, single-request max_tokens, and concurrent slots reserved for the local machine.
  • Model filtering: Blacklist / whitelist apply to both listing and invocation.
  • Circuit breaking: When the upstream is continuously rate-limited, the LAN channel is paused (503, no requests are sent upstream during the cooldown); insufficient balance, network timeouts, etc., do not trigger circuit breaking.
  • Image input: Disabled by default; when enabled, images are briefly written to the plugin’s attachment directory to satisfy DSH’s attachment flow, with an accompanying ledger and a dry-run cleanup policy.

Usage and Diagnostics

Only calls routed through this plugin are counted. Token usage can be viewed by time, API key, and call type, and a self-contained HTML report can be exported. The diagnostics area shows in-flight requests and circuit-breaker state, and exports redacted information.

Environment and DSH Versions

  • Node.js: ^22.19.0 || >=24.0.0 (see engines in package.json).
  • DSH: Requires 0.1.5-rc.2 or above; the README states that both 0.1.5 and 0.2.0 have been tested for installation, forwarding, and the settings panel.

Installation and Activation

First set up the global DSH and Node environment, then install the plugin. Use the installation commands from the repo README as the source of truth (replace web with your profile name):

npm install -g @deepseek-ai/dsh
dsh plugin --profile web add dsh-lantern

New bundles are not hot-applied to already-running processes; you need to restart DSH and refresh the browser:

dsh --profile web

After restart, go to the gear icon at the bottom of the sidebar → the LANtern settings entry will appear on the left.

Recommended sequence to get the service working:

  1. Status & Security → Service switch: Turn on the master switch (off by default).
  2. Status & Security → Listening and port: Select standalone, bind 0.0.0.0, and choose a port (e.g., 3081).
  3. Status & Security → API Key management: Generate a key and copy the plaintext immediately.
  4. On other devices, call using the LAN IP and the port above (on Windows, use ipconfig to find the IP).

Uninstall:

dsh plugin --profile web remove dsh-lantern

After uninstalling, you also need to restart DSH and refresh the page; once the plugin directory is deleted, data/ is removed along with it. Upstream quota is still shared with the local DSH conversation—this is the design premise of reusing the login session.

Typical Usage

On another device on the LAN, replace <your-computer-IP>, <port>, <your-generated-key>, and <model>@<provider> with the actual values.

View available models:

curl http://<your-computer-IP>:<port>/v1/models \
  -H "Authorization: Bearer <your-generated-key>"

OpenAI-compatible chat:

curl http://<your-computer-IP>:<port>/v1/chat/completions \
  -H "Authorization: Bearer <your-generated-key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"<model>@<provider>","messages":[{"role":"user","content":"Hi"}]}'

If the client only recognizes the Anthropic protocol, enable /v1/messages under Settings → LANtern → Status & Security → Protocol channels, use the Base URL http://<IP>:<port>, and pass the key in the x-api-key header.

Use Cases and Notes

Suitable for: Users who already centrally manage multiple providers on a single machine with DSH, want to access the same set of models on the same LAN using OpenAI / Anthropic-compatible clients (including some CLI tools), and are willing to manage keys, ports, and the firewall themselves.

Please be aware before using:

  • The plugin runs with the permissions of the current dsh process; before installing, read the source code and LICENSE to confirm it meets your security policy.
  • LAN reachability depends on the bind address (127.0.0.1 is local-only), the firewall, and whether devices are on the same network segment; 401 usually means a missing or incorrect key, 404 usually means the model name lacks @provider, 429 indicates rate limiting, and 503 may indicate circuit breaking.
  • Providers not registered in DSH cannot be exposed by LANtern; capability declarations may not match actual upstream behavior, and the “functional test” on the model page actually consumes quota.
  • Known limitations include shared upstream quota, dependence on the DSH model registry, and the fact that functional/performance test results do not automatically update capability declarations.

Conclusion

dsh-lantern converges “models already configured locally in DSH” into standard compatible APIs on the LAN, controlling the exposure surface with keys, rate limits, and a local-first concurrency policy; configuration and secrets remain in the plugin’s own data/ directory. To learn more, view the summary on the SkillHub catalog page, and read the full README, troubleshooting guide, and reuse mode documentation in the GitHub repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye