NinjaSln-labs/dsh-session-slm-router

dsh-session-slm-router

Shadow-mode SLM router for DeepSeek Harness: per-turn weak/strong prediction via vertical-small-model CLI, writes shadow JSONL log

Uncategorizeddeepseek-harnessmodel-routingshadow-mode

dsh-session-slm-router

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.

中文

Installation

# Via dsh plugin (recommended, auto-registers the bundle)
dsh plugin add dsh-session-slm-router

Configuration

Mode

modeBehavior
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
offDisabled

Full config example

session-slm-router:
  mode: shadow
  weakOnlyMainOnly: true
  predictCmd: "python3 <path-to>/vertical-small-model/scripts/route_predict.py"
  predictModel: "<path-to>/vertical-small-model/data/eval/routing-v0/model-r1.json"
  timeoutMs: 250
  logPath: "slm-shadow/session-slm-shadow.jsonl"
  weakSlots:
    - { provider: <provider>, model: <model> }
  strongSlots:
    - { provider: <provider>, model: <model> }
  • predictCmd / predictModel (required): path to the vertical-small-model CLI
  • weakSlots / strongSlots: candidate model slots for routing

Development

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