drscrewdriver / dsh-thinking-levels

목록에 있음

deepseek-harness dsh thinging levels 调整 reasoning强度调整

master기타 소스 보기

설치

npx -y @deepseek-ai/dsh plugin --profile web add github:drscrewdriver/dsh-thinking-levels

이 설치 명령은 GitHub 저장소 주소에서 생성된 확인되지 않은 시작점입니다.

README

유지 관리자가 작성한 문서 스냅샷입니다.

GitHub에서 보기 ↗
커밋 db3738f동기화 2026. 8. 18.

dsh-thinking-levels

Per-round thinking-level (reasoning_effort) control for DeepSeek Harness (dsh): five levels — off / low / high / max for manual control, plus an auto scheduler that keeps cheap tool rounds cheap and never starves heavy work.

中文文档 · English

In a multi-step tool chain, the model re-thinks before every tool call — and that thinking dominates the wall-clock time (a 50-step agent task can spend minutes reasoning between tools). dsh-thinking-levels plugs into the agent/request waterfall that dsh re-resolves for every step, and injects a thinking level into the next model request.

Levels

LevelMeaning
offthinking disabled (manual only — never auto-picked)
lowmanual pick for simple chat tasks (cheap rounds stay cheap)
highthe official default effort
maxheavy work
autoschedule per step from the recent tool-call history

Wire-level facts (verified against the official DeepSeek docs and dsh's llm-deepseek adapter): low maps 1:1 on deepseek-v4-flash / v4-pro, while medium / xhigh collapse onto high. The adapter accepts off | low | high | max and rejects anything else with UNSUPPORTED_REASONING_EFFORT — this plugin validates the configured level before injecting, fail-loud.

Auto scheduler

The hub is high (the official default). auto schedules between low / high / max; it never picks off, and it always resolves to a wire level before injecting.

Recent tool callsLevel
none (fresh prompt, pure chat)low
≥75% simple tools, small args, downgrades allowedlow
mixed / heavy toolshigh
very heavy payloads, upgrades allowedmax

Install

# 1. install the plugin into a profile from GitHub (web shown; any profile works)
#    (the web profile is a pnpm workspace root, so -w is required)
dsh plugin --profile web add https://github.com/drscrewdriver/dsh-thinking-levels.git -w
#    local-path alternative (no network needed, no -w outside workspace roots):
#    dsh plugin --profile web add /absolute/path/to/dsh-thinking-levels

# 2. restart dsh web
#    (a running instance does not hot-load new bundle layers)
dsh web

Manual link: registration (alternative to dsh plugin add):

#    ~/.dsh/profiles/web/package.json dependencies:
#      "dsh-thinking-levels": "link:<absolute path to dsh-thinking-levels>"
#    ~/.dsh/profiles/web/cordis.patch.yml:
#      - insert:
#          - id: thinking-levels
#            name: dsh-thinking-levels
cd ~/.dsh/profiles/web && pnpm install && dsh web

Configuration

Two surfaces share one schema:

  • Assembly — the plugin row's config: in the profile composition (e.g. cordis.yml):
    config:
      level: high            # off | low | high | max | auto
      allowDowngrade: false  # forbid the scheduler dropping below `high`
      allowUpgrade: false    # forbid the scheduler lifting to `max`
    
  • Runtime — the dsh-settings namespace thinking-levels (level, allowDowngrade, allowUpgrade, enabled): changes apply to the next model request, no restart needed.

Defaults: { enabled: true, level: 'auto', allowDowngrade: true, allowUpgrade: false }.

Development

npm run lint        # eslint (typescript-eslint flat config)
npm run typecheck   # tsc --noEmit
npm test            # vitest — 21 tests

Test coverage: level policy (manual pass-through, auto scheduler, validation, simple-tool boundary), session-event parsing (guards, window cap, malformed records), and the config schema (defaults lockstep, out-of-band rejection).

License

MIT

프로젝트 파일 및 신호

표시된 항목은 디렉터리 스냅샷에서 감지된 공개 저장소 신호입니다.

테스트감지됨

저장소 정보

언어
TypeScript
라이선스
보고되지 않음
마지막 업데이트
2026. 8. 18. 오후 4:18

신중하게 설치하기

소스 코드, 권한, 수명 주기 스크립트, 의존성 및 네트워크 접근을 검토하고 신뢰하지 않는 플러그인은 격리 환경에서 테스트하세요.