Foreword¶
In the development workflow of DeepSeek Harness (DSH), when adapters translate provider SSE streams into the internal StreamChunk protocol, response-level metadata (including system_fingerprint) is usually discarded. This makes it difficult for developers to confirm in the Web UI which model deployment version actually served the current reply. The dsh-fingerprint-show plugin solves the problem of validating model deployment consistency by capturing this fingerprint and displaying it as plain text at the end of the metrics line for every AI reply.
What This Is¶
A DSH client plugin maintained by Bortor. It captures the provider model fingerprint for each model call (the OpenAI-compatible system_fingerprint field) and displays it as plain text at the end of the metrics line for every AI reply in the Web UI.
Core Features¶
- Complete Fingerprint Text: Appends the actual model fingerprint for that call as plain text (e.g.,
… 127 tok/s · 0123456789abcdef0123456789abcdef), without truncation, and without buttons or icons. - Consistent Native Styling: Uses 14px font, 24px line height, tertiary gray (
--dsw-alias-label-tertiary), and 10px dot spacing, making it pixel-level consistent with native metrics text. - Synchronized Hover Behavior: The fingerprint appears and disappears together with metrics such as time and duration; it fades in with them on hover or focus (80ms transition) and fades out together when the pointer moves away.
- Historical Retention: After switching models mid-session, each reply is annotated with the deployment that was actually in effect at that time.
- Zero Intrusion: Does not modify session logs, does not enter the model context, and does not affect the KV cache.
Installation and Enabling¶
Prerequisites: dsh CLI and pnpm are installed.
git clone <this-repo> dsh-fingerprint-show
cd dsh-fingerprint-show
pnpm install
dsh plugin --profile web add <path-to-checkout>
Note: The
addargument is the plugin package directory itself. Runningadd ./dsh-fingerprint-showinside the repository directory would point the link to a non-existent subdirectory (pnpm will still record the dependency, but the bundle layer will not take effect). After installation, usedsh --profile web --dump-configto confirm the output contains the# == dsh-fingerprint-showline.
After restarting dsh web, move the cursor over an AI reply, and the · full fingerprint text will appear at the end of the metrics line.
The plugin is enabled only under the web profile (it depends on its
webServerservice); it remains dormant in headless profile.
Configuration¶
Override the line configuration by id in the profile’s cordis.patch.yml or a --patch overlay. Note that patch replaces the entire configuration line; when overriding, restate all required keys.
- id: fingerprint-show
config:
pathPrefix: /dsh-fingerprint-show # HTTP 路由前缀
matchPatterns: # 对请求 URL 做子串匹配
- chat/completions
maxObservations: 500 # 进程内环形缓冲容量
Diagnostics¶
Open /dsh-fingerprint-show/api/observations directly in the browser (same-origin) to view the captured results:
{
"observations": [ { "fingerprint": "…", "model": "…", "sessionId": "…", "time": 123 } ],
"stats": {
"matchedResponses": 2,
"capturedFingerprints": 2,
"parsedChunks": 2,
"inflightCalls": 0,
"totalStored": 2
}
}
If matchedResponses > 0 and capturedFingerprints = 0, the provider response does not contain system_fingerprint (common with self-hosted or proxied endpoints); lastPayloadSample returns the first SSE payload sample of the latest response without a fingerprint.
Limitations¶
- Concurrent Attribution: Concurrent calls to the same model (e.g., simultaneously running subagents) are attributed by “most recently in time”; under extreme concurrency, attribution may fall to an adjacent call — but the fingerprint itself identifies the model deployment version, so the value remains correct.
- Auxiliary Calls Excluded: Auxiliary calls (conversation titles, compression) have
purposemarkers, are excluded during matching, and do not participate in message annotation. - Missing Endpoints: The fingerprint is returned by the provider; self-hosted endpoints that are not OpenAI-compatible may not include this field (it is then not displayed).
- Metrics-Line-Only Display: It is displayed only on messages that have a metrics line (
timing); messages without metrics text do not show the fingerprint.
Development¶
pnpm install
pnpm run build # esbuild → lib/index.js (Node ESM) + lib/client.js (浏览器 lazy-CJS)
pnpm test # 主机流水线 + 客户端 bundle 冒烟测试
Summary¶
This plugin captures and displays system_fingerprint at the Web UI level, allowing developers to intuitively verify the deployment consistency of model calls. It uses a zero-intrusion design and combines HTTP routing with front-end half-area registration to implement the functionality. It is suitable for developers who need to confirm model versions in debugging or production environments.