dsh-call-shrink
Run the following command in DeepSeek Harness:
dsh plugin install zhuzichen362/dsh-call-shrink
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install zhuzichen362/dsh-call-shrink in your DeepSeek Harness terminal to install, or fetch the source from https://github.com/zhuzichen362/dsh-call-shrink and inject it as a dynamic Cordis plugin.
About this plugin
In a DSH agent environment a single model turn often spawns multiple parallel sub-tasks—tool calls, title generation, repeated streams—each of which triggers a real upstream API call. When the requests are near-duplicates or identical, tokens and billable usage balloon for no additional value. dsh-call-shrink intercepts these calls at the Stream layer and compresses them to the minimum number of upstream requests through deduplication, caching, and batch merging, without changing the conversation outcome.
The core is a three-tier compression pipeline. First, a stable-fingerprint cache replays historical responses (24-hour TTL, 4096 entries, disk-persisted). Second, in-flight requests with the same fingerprint share a single upstream result. Third, a batch-merge window collects up to N independent requests within 10 seconds and bundles them into one upstream call—no item limit, no character-based chunking. The merge protocol wraps each sub-conversation in [[TASK n]] delimiters; the model emits structured JSON per task, and any parse failure gracefully falls back to sequential retries so no answer is lost. Title-generation requests are short-circuited to zero calls, and a cost-awareness constraint is injected into the system prompt to encourage the model to batch parallel tool calls proactively.
Built for developers running DSH agent workloads with multi-session or parallel sub-agent patterns who care about API spend. After installation, a real-time panel in the session header displays today's usage against budget, dedup hits, cache hits, and the number of calls saved—pairing with a daily budget dashboard so every upstream call earns its keep.
Use Cases
- Parallel sub-agents generating duplicate upstream API calls
- Lightweight tasks like title generation triggering redundant requests
- Multi-session workloads requiring strict daily LLM call budget control
Best For
- Developers using the DSH agent framework who care about API spend
- Workflow architects running complex parallel sub-agent pipelines
- Ops engineers optimizing LLM call volume and token consumption
Related Plugins
Free web search plugin for DeepSeek Harness with web search, X search, and page fetch; no signup or API key required, with automatic multi-engine failover.
AnySearch-powered web and vertical search plugin for DeepSeek Harness, offering real-time search, cleaned URL content, concurrent batch search via native web_search/web_fetch, no API key required.
Pixel-perfect webpage clone tool that uses an agent harness to turn any webpage into a scored, full-page React replica.
A bilingual cost-tracking plugin for DeepSeek Harness with session/daily cost, budget, official & custom provider balance, coding plan quotas, peak/off-peak pricing alerts, and history stats.