๐Ÿง  dsh-model-memory

September 2, 2026 ยท View on GitHub

License: MIT DSH Ecosystem TypeScript

็ฎ€ไฝ“ไธญๆ–‡ | 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 supportsReasoningEffort and allows selecting supported tiers (low / medium / high / max).
  • Instant Persistence: Saves atomically into ~/.dsh/settings.yaml with 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 retryPolicy is 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

dsh plugin --profile web add dsh-model-memory
# 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.