AI Agent Hub
Back to plugins
dsh-context-lens preview

dsh-context-lens

Model Inference Updated 2026.08.14

Run the following command in DeepSeek Harness:

dsh plugin install gordonlu/dsh-context-lens

Paste the following prompt into your AI chat to install this plugin:

Install this plugin in DeepSeek Harness by running dsh plugin install gordonlu/dsh-context-lens; source is available at https://github.com/gordonlu/dsh-context-lens

About this plugin

Running multi-turn conversations or Agent pipelines through DeepSeek Harness means the context committed to each model request is quietly shifting between calls: the system prompt is rewritten, tools are added or removed, declaration order changes, request config tweaks. These changes nudge cache hit rates in ways that are easy to notice on the token bill but hard to trace back to a specific request and a specific field. dsh-context-lens exists to make that traceability visible. It is a pure-observer plugin that reads the session log request by request, injects nothing into any prompt, mints no new session events, and adds zero overhead to the harness runtime.

Open the Request Context tab and every real LLM call gets one compact card with four layers of detail. First, request identity: turn, step, provider, model, context window, and completion status. Second, canonical fingerprints of everything committed to that request: the system prompt, each tool's schema hash with estimated tokens, the request config, and the tool declaration order. Third, a cache-reuse readout computed strictly from the provider's disjoint usage buckets (uncached input, cache reads, cache writes); missing fields render as a dash, never a misleading zero. Fourth, a line-by-line diff against the previous request covering system, tool set changes, tool order, config, model, provider, and the cache-reuse boundary in percentage points. When reuse drops past a threshold, a Drop alarm fires with a ranked list of coincident changes, explicitly labeled as correlation rather than causation.

This plugin is built for developers who run Agent or tool-calling pipelines on Harness and keep asking the same question: why did my cache utilization dip this turn? It surfaces only what is genuinely observable in the session log, never claims knowledge of the provider's internal cache-key construction, and never overstates causality. If you need a glanceable, per-request change panel that tells you what moved and how it affected cache reuse without touching a single model call, dsh-context-lens fills that gap cleanly.

Screenshots

Use Cases

  • Diff every model request's system prompt, tool set, and declaration order to pinpoint why cache hit rate is dropping
  • Track uncached input and cache-read readouts across requests to catch silent cost drift
  • When cache reuse drops sharply, auto-list coincident context changes ranked by correlation to assist root-cause analysis

Best For

  • Developers building multi-turn Agent or tool-calling pipelines on Harness
  • LLM application engineers diagnosing token bill drift and cache-utilization drops
  • Platform ops who want a non-invasive, per-request audit trail of committed context without touching model calls