JessenReinhart/dsh-tokenslash ↗★ 0
dsh-tokenslash
TypeSafe Jev token optimization suite for DeepSeek Harness (DSH): Subagent Router, Fork Decoupler, Tool Schema Pruner, Output Compactor, and Settings UI 适合需要子代理路由、工具裁剪等深度Token优化和控制的用户。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:JessenReinhart/dsh-tokenslashドキュメント
README 全文を読む ↗Configuration
| Key | Type | Default | Purpose |
|---|---|---|---|
enabled | boolean | true | Master switch |
provider | string | opencode | Active Jev provider id |
customBaseUrl | string | http://127.0.0.1:20128/v1/systemone | Base URL when provider=custom |
apiKey | string | "" | Bearer token for auth providers |
model | string | jev-1.13-free | Default triage model |
decoupleThreshold | number (0-1) | 0.85 | Confidence cutoff for subagent fork |
modelTiers.cheap | string (CSV) | gemini-2.5-flash, deepseek-chat, gpt-4o-mini | Cheap tier list |
modelTiers.medium | string (CSV) | gemini-2.5-pro, claude-3-5-haiku | Medium tier list |
modelTiers.smart | string (CSV) | deepseek-reasoner, claude-3-7-sonnet, gpt-4o | Smart tier list |
toolPruningMode | string | "normal" | Pruning mode: "normal" (intent-based, keep core tools), "extreme" (prune all tools), "off" (no tool pruning) |
pinnedTools | array of strings | [] | Explicit tool names to preserve regardless of intent or extreme pruning |
failOpen | boolean | true | Preserve all tool groups if triage endpoint fails or returns invalid response |
modules.subagentRouting | boolean | true | Enable routing hook + auto-route handler |
modules.toolPruning | boolean | true | Enable tool output prune hook |
modules.promptPruning | boolean | true | Enable system prompt & tool schema pruning before model request |
modules.outputCompacting | boolean | true | Enable compact hook |
modules.goalGuard | boolean | true | Enable goal budget warnings |
Helpers:
parseConfig(raw)— schema-validated config with defaults.parseModelTiers(tiers)— CSV/array →{ cheap, medium, smart }arrays.getConfigForProvider(provider, overrides)— resolves baseUrl/model per provider.getProviderConfig(provider, config)/listProviders()/fetchModels(provider, opts)— cached (5 min TTL) model discovery;clearModelsCache()busts cache.