Introduction¶
In a DSH session, a single conversation often triggers multiple real LLM requests. Between adjacent requests, determining whether submission states like system prompt, tool set, and request configuration have changed, and whether cache reuse changes accordingly, usually requires repeatedly checking logs. dsh-context-lens is a DeepSeek Harness plugin designed to continuously answer a question: what request is this harness sending to the model, and what changes have occurred relative to the previous request.
It emphasizes being a “pure observer”: it reads session logs without adding content to them or touching model calls. Below, we introduce its positioning, capabilities, installation method, and applicable boundaries.
What is it¶
The repository for dsh-context-lens is gordonlu/dsh-context-lens, maintained by gordonlu, and licensed under MIT.
Its positioning is Request Context Profiler for DeepSeek Harness. Its core purpose is to generate a single checkable record for each real LLM request, displaying the submitted request context, cache reuse readings, and changes relative to the previous request.
Core Features¶
Record a line for each real LLM request¶
The plugin records the following information for each real LLM request:
- Request identifier
- Submitted request context
- Cache reuse readings
- Diff with the previous request
- Degradation alerts
Comparable content includes: model, provider, request config, system prompt, tool set, tool declaration order, estimated context surface area, and cache reuse boundaries.
The term “submitted” is emphasized here: the plugin compares the state that actually entered the real model request, not claiming to observe the harness memory state.
Cache Reuse Readings¶
Cache reuse readings are strictly based on the provider’s usage buckets:
uncached input
cache reads
cache writes
billed input
The plugin uses these fields to present cache reuse changes rather than inferring the provider’s internal cache implementation.
Change-Focused View¶
The plugin provides zh/en conversation.view, containing:
- Session status bar
- Recent requests list
- Inspector
- Technical details collapsible section
The recent requests list retains a maximum of 100 entries.
Boundaries and What it Doesn’t Do¶
The plugin is a pure observer: it reads session logs, does not add content to the logs, and does not touch model calls.
It does not create new session events, does not use model tools, does not perform prompt injection, and does not perform KV simulation.
Degradation alerts only display relevant changes and explicitly state that “correlation does not imply causation.”
The plugin does not claim to determine the following:
- Provider internal cache key construction
- The exact
tokenwhere prefix reuse breaks - Which change caused the cache reuse drop
- Session/request cache state after leaving the 100-entry retention window
harnessmemory state
Tested Invariants¶
Real-time fold and replay consistency from init are described as tested invariants.
Installation and Enablement¶
dsh-context-lens is an npm package. It requires Node >=20.19.0 at runtime, with runtime dependency zod ^3.23.8.
All @deepseek-ai/* references in the repository are type-only and include dev-time type-only vendor-stubs. The browser bundle reproduces the harness client-bundle ABI.
First, install the plugin to the web profile:
dsh plugin --profile web add dsh-context-lens
Typical Usage¶
After completing the above steps, you can use it as follows:
- Open any session.
- Switch to the
Request Contexttab. - View a line record for each model request: the changes relative to the previous request, and how cache reuse changes.
If developing from source, first perform dependency installation, type checking, testing, and building:
pnpm install
pnpm typecheck
pnpm test
pnpm build
Real runtime smoke scripts are located in smoke/, including:
- server-side smoke
- client-loader ABI smoke
- full GUI E2E against a second web instance with a mock LLM
Applicable Scenarios and Notes¶
Suitable for checking context changes in real LLM requests within DSH sessions, especially submission states like system prompt, tool set, tool declaration order, and request config, as well as the trend of cache reuse readings changing with requests.
Please note before use:
- The plugin runs with the current dsh process permissions; check the source code and MIT license before installing.
- Degradation alerts are only correlation hints, not causal judgments.
- The recent requests list retains a maximum of 100 entries; cache state after leaving this window is not claimed to be determinable.
- The plugin does not touch model calls or observe
harnessmemory state.
Links¶
- GitHub: gordonlu/dsh-context-lens
- Directory page: The verified materials from this group did not provide a specific URL