# dsh-session-slm-router [![npm version](https://img.shields.io/npm/v/dsh-session-slm-router)](https://www.npmjs.com/package/dsh-session-slm-router) [![License](https://img.shields.io/badge/license-MIT-blue)](LICENSE) Shadow-mode SLM router plugin for DeepSeek Harness. Per-turn weak/strong prediction via the `vertical-small-model` CLI; writes a shadow JSONL log **without changing the active session model** (S1 only). > ⚠️ **S1** — default `shadow` mode: observe only, no model switching. `weak-only` mode (S3 grayscale) allows downgrade-to-weak switches but does not persist the user's original model. [中文](README.md) ## Installation ```bash # Via dsh plugin (recommended, auto-registers the bundle) dsh plugin add dsh-session-slm-router ``` ## Configuration ### Mode | mode | Behavior | |------|----------| | `shadow` (default) | Predict + write shadow log, **no model switching** | | `weak-only` (S3) | Downgrade to weak slot when predicted; `switch_to_strong` logged but not executed | | `off` | Disabled | ### Full config example ```yaml session-slm-router: mode: shadow weakOnlyMainOnly: true predictCmd: "python3 /vertical-small-model/scripts/route_predict.py" predictModel: "/vertical-small-model/data/eval/routing-v0/model-r1.json" timeoutMs: 250 logPath: "slm-shadow/session-slm-shadow.jsonl" weakSlots: - { provider: , model: } strongSlots: - { provider: , model: } ``` - `predictCmd` / `predictModel` (required): path to the [vertical-small-model](https://github.com/NinjaSln-labs/vertical-small-model) CLI - `weakSlots` / `strongSlots`: candidate model slots for routing ## Development ```bash git clone https://github.com/NinjaSln-labs/dsh-session-slm-router.git cd dsh-session-slm-router npm install --legacy-peer-deps npm run build npm test ``` ## License MIT © 2026 ninjasln