๐ง dsh-model-memory
September 2, 2026 ยท View on GitHub
็ฎไฝไธญๆ | English
dsh-model-memory is a plugin for DeepSeek Harness (DSH) that provides reasoning effort management, channel-level retry policy control, and cross-session preference memory for custom API models.
๐ Key Features
1. ๐ง Custom Model Reasoning Effort Configuration
- Seamless UI Integration: Automatically mounts inline reasoning effort controls directly under custom model items inside DSH Settings -> Models.
- Effort Tiers Selection: Enables
supportsReasoningEffortand allows selecting supported tiers (low/medium/high/max). - Instant Persistence: Saves atomically into
~/.dsh/settings.yamlwith immediate effect.
2. โก Cross-Session Preference Memory
- Per-Channel Memory: Accurately remembers the last chosen model and reasoning effort (e.g.
max) per custom provider channel. - Auto-Fill on Session Start: Automatically restores your preferred model and thinking tier when creating new sessions or switching channels.
3. ๐ Channel-Level Request Retry Policy
- Three Modes: Channel default (up to 5 retries after a failure), unlimited retries (keeps retrying until success or cancellation), or a custom count (0 disables retries).
- Applies per Channel: DSH's
retryPolicyis a channel-level setting shared by all models inside the channel; updates preserve the channel's existing backoff parameters and reuse the same write path as reasoning effort (host settings service first, atomic direct file write as fallback).
4. ๐ก๏ธ Lightweight & Upgrade-Immune
- Zero UI Clutter: Clean integration within settings pages without adding stray buttons to the main view.
- Upgrade-Safe: Retains your configuration and local plugin across global DSH CLI upgrades.
๐ Installation
Option 1: Install from NPM (Recommended)
dsh plugin --profile web add dsh-model-memory
Option 2: Local Development with Link
# 1. Clone repository
git clone https://github.com/Mutx163/dsh-model-memory.git
cd dsh-model-memory
# 2. Install dependencies & verify
pnpm install
pnpm run verify
# 3. Mount to DSH Web Profile
dsh plugin --profile web add link:/path/to/dsh-model-memory
๐ Project Structure
dsh-model-memory/
โโโ src/
โ โโโ index.ts # Plugin lifecycle and Agent default model wrapper
โ โโโ memory.ts # Model & reasoning effort memory algorithm engine
โ โโโ rpc.ts # /model-memory bidirectional RPC channel
โ โโโ settings.ts # settings.yaml atomic configuration manager
โ โโโ store.ts # Disk persistence engine (~/.dsh/model-memory.json)
โ โโโ types.ts # TypeScript definitions
โ โโโ client/
โ โโโ index.ts # Web UI client components
โโโ test/ # Vitest unit test suites
โโโ cordis.patch.yml # Cordis patch layer
โโโ LICENSE # MIT License
โโโ README.md # Chinese Documentation (Default)
โโโ README_EN.md # English Documentation
๐งช Development & Testing
# TypeScript typecheck
pnpm run typecheck
# Run unit tests
pnpm run test
# Full verification & build
pnpm run verify
๐ License
Licensed under the MIT License.