wings1848/dsh-economizer

wings1848★ 2JavaScript最后同步: 2026-08-22

在 GitHub 打开

dsh-economizer — 给 DeepSeek Harness (dsh) 省 token 的 agent preset:tools/MCP/skills 按需加载、缓存稳定注入式加载、v3 检索匹配器、缓存命中率实测。On-demand tool/MCP/skill loading for DeepSeek Harness — cache-stable injection, CJK-aware matcher, measured cache-hit & token savings.

README 摘要

dsh-economizer A token-saving preset for DeepSeek Harness (dsh): tools / MCP / skills load on demand, schemas are injected at the tail of the conversation, and the tools array never changes - so the prefix cache stays valid from start to finish. Read this in 简体中文. Introduction By default, dsh stuffs every tool schema (core + MCP + delegation + web) into every single request. DeepSeek's API has no server-side tool search, so those schemas are tokens you pay for on every turn even when unused; the skill catalog adds another 9KB per turn. What this preset does: - keep a small set of core tools resident, plus a name-only catalog of everything else (the skill catalog lists names only, no descriptions); - when the model needs a tool, tool search / tool load inject the full schema at the tail of the conversation, and the model calls it by name; - the tools array is fixed from boot, so the prefix cache never invalidates no matter how much you load - that's the main difference from "naive on-demand loading". Measured on the author's machine (67 tools): Metric Result Tool schemas per request 67 down to 26 (after loading 7), 16,443 down to 6,342 tokens New-session startup 67% saved (the 9KB/t…

在 GitHub 查看完整 README →
Agent/智能体agentagent-presetai-agentcache-stablecoding-agentcontext-cachingdeepseekdeepseek-harness

分类