dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
OpenRouter free-models browser & one-click model config for DeepSeek Harness (DSH) — newest-first, local search, platform tabs. DSH 免费模型浏览器:按最新排序、本地搜索、一键添加到模型列表
dsh-model-list is a DeepSeek Harness (DSH) plugin that browses OpenRouter's model directory (the official openrouter.ai/models catalog) and adds any model — free variants included — to your DSH model list in one click.
PLATFORMS registry makes future providers a one-line addition). All
fetch logic runs host-side; the tab is the single entry point.localStorage (default off).rgba(0,0,0,.32)
scrim with blur(12px) saturate(1.2), a color-mix(bg-layer-1 78%) glass panel with a
border-l2 hairline, 14px radius and a 0 16px 48px rgba(0,0,0,.28) shadow, border-l1
dividers, solid button-primary-fill for primary buttons and active tabs / sub-tabs /
filter chips, bg-base inputs, bg-layer-2 cards, and state-* tokens for status colours.https://openrouter.ai/api/frontend/v1/models/find?active=true&fmt=cards&order=newest — once with
variant=standard and once with variant=free (both return one card per model, no pagination) — and
joins each card's weekly token usage from the response's data.analytics. The browser renders the
official filter set client-side: search, sort (weekly usage / newest / context size / input price /
output price / name), input & output modalities, prompt-pricing buckets (Free / <$1 / $1–$2 / $2–$5 /
$5–$10 / >$10 per M tokens), context-length buckets (<8K / 8K–32K / 32K–128K / 128K–1M / >1M),
capabilities (tools / reasoning / structured outputs), series and providers. Cards follow the official
anatomy: author avatar, name, weekly usage, provider, description, and spec chips (context, max output,
input/output price per M tokens, modality arrows, capability badges).GET /api/v1/key on demand). Confirming then
.credentials.yaml, OPENROUTER_API_KEY),settings.yaml (llm-pi-ai namespace — reuses the
existing openrouter / openrouter-free / openrouter.ai route when one exists, preserving its
apiKeyEnv and model entries verbatim; otherwise creates openrouter-free with the
openai-completions protocol and https://openrouter.ai/api/v1), andagent-default-model namespace).
The model is selectable in the chat composer's model selector immediately — no host restart.$DSH_HOME/dsh-model-list.json (6-hour freshness window).| Script | What it does |
|---|---|
npm run check | tsc -b typecheck (host + client programs) |
npm run build | clean lib/, tsc -b, then tsdown bundles lib/index.js (host, ESM) + lib/client.js (browser, __ModuleLoader__ factory) |
npm run watch | tsdown watch mode |
npm run verify | simulate the host module loader against lib/client.js (factory shape + seed externals) |
npm run test:ops | offline host-logic tests (find/cards normalization, weekly-usage join, route detection, config-write orchestration, store round-trip incl. v1-cache rejection) |
npm run smoke | live smoke test against the real OpenRouter models/find endpoint |
npm run release | check + build + verify, then npm version patch and git push --follow-tags |
npm run publish:npm | check + build + verify, then npm publish --access public |
# Local development (link the workspace; picks up rebuilds of lib/ automatically)
dsh plugin --profile web add ./dsh-model-list
# Published: npm / tarball / GitHub
dsh plugin --profile web add dsh-model-list
dsh plugin --profile web add github:you/dsh-model-list#<sha>
dsh --profile web --dump-config # verify the layer
dsh --profile web # start (restart required for the host half to load)
Local development dependencies: the host loads
lib/index.jsthrough native Node ESM, so@deepseek-ai/schemasteryand@deepseek-ai/dsh-settingsmust be resolvable from the plugin directory. Either runpnpm installinside the plugin directory, or use the committedlib/build (this repository commitslib/, mirroring dsh-jenkins).
OPENROUTER_API_KEY is reused and noted in the dialog),src/client/components/FreeModelsSection.tsx: append { id, labelKey } to PLATFORMS and mount the
panel by id.src/client/components/OpenRouterPanel.tsx as a starting point; ops carry platform: '<id>'.src/host/ops.ts: extend the runOp platform dispatch (fetch/filter per the platform's API, map its
models onto RouteModelProfile, and teach model-config.ts the platform's credential ref and route
naming).├── src/host/*.ts # Host half: /dsh-model-list/api route (platform-dispatched ops),
│ # OpenRouter fetch+filter+sort (10 retries), cache store,
│ # model-config writer (settings + credentials services)
├── src/client/*.tsx # Browser half: settings.section shell with platform tabs,
│ # per-platform panel (search, cards), add-to-model-list dialog
├── lib/index.js # Host half build artifact (tsdown, ESM), committed
├── lib/client.js # Browser half build artifact (tsdown → __ModuleLoader__ factory), committed
├── scripts/ # verify-client.mjs, test-ops.mts (offline), smoke-openrouter.mts (live)
├── tsdown.config.ts # node half + client bundle banner wrapper
├── cordis.patch.yml # Bundle patch: plugin row referenced by package name
└── package.json # dsh.bundle + dsh.client(web) manifests + peerDependencies
settings.update('llm-pi-ai', …) validates against the
llm-pi-ai schema (a bad profile is refused where it is written) and the adapter re-registers routes
live, so no host restart is needed after adding a model.apiKeyEnv, extra profile fields) are preserved:
adding a model only rewrites that route's models array (merged by id, same id → replaced).dsh-model-list.json) is the only file it writes.