Skip to content

cdxiaodong/dsh-llm-inspector

30Last commit Aug 15, 2026

dsh-llm-inspector DSH plugin

dsh-llm-inspector is a DeepSeek Harness plugin that consolidates four capabilities via configuration switches: reasoning control, external thinking export, traffic/packet analysis, and session persistence audit. It intercepts LLM requests and responses to provide insights and control over model behavior.

How to install the dsh-llm-inspector DSH plugin

dsh plugin --profile <你的profile> add github:cdxiaodong/dsh-llm-inspector

This source command needs manual review. Copying does not run it.

dsh-llm-inspector DSH plugin data source

dsh-llm-inspector DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-llm-inspector DSH plugin can do

  • Override reasoning effort via `agent/request` waterfall, setting `reasoningEffort` to 'none', 'low', 'medium', or 'high'.
  • Export external thinking for models with encrypted reasoning (OpenAI, Anthropic, Gemini) by registering a `think` tool and injecting system prompt.
  • Capture and analyze traffic chunks in `llm/stream` waterfall, including reasoning blocks and tool-call blocks.
  • Persist session events and streamed chunks to `audit.jsonl` for auditing.
  • Provide two services (`inspectorTraffic` and `inspectorAudit`) that can be injected by other plugins.

Where the dsh-llm-inspector DSH plugin fits

  • Disable reasoning for cost-sensitive or latency-sensitive tasks by setting `reasoningEffort` to 'none'.
  • Capture model's internal reasoning as think tool calls for models that conceal reasoning, using external thinking export.
  • Monitor and log LLM traffic for debugging, performance analysis, or compliance.
  • Audit full conversation history with `persistSession` for later review or reporting.
  • Integrate traffic statistics or audit logs into other plugins via the exposed services.

Who the dsh-llm-inspector DSH plugin is for

  • DSH plugin developers who need to inspect or modify LLM request/response behavior.
  • Operators or researchers who want to audit LLM interactions in a DSH environment.

dsh-llm-inspector DSH plugin limitations

  • Only works within DeepSeek Harness (DSH) plugin ecosystem; not standalone.
  • External thinking for encrypted reasoning models (OpenAI, Anthropic, Gemini) is a 'soft force' via system prompt, not guaranteed 100% trigger rate.
  • Requires manual configuration of each capability via YAML settings.
  • Session audit logs may contain sensitive data; user must ensure secure storage and access control.

dsh-llm-inspector DSH plugin: from the repository README

Quoted from the cdxiaodong/dsh-llm-inspector README, the upstream source of the dsh-llm-inspector DSH plugin. Copyright remains with the original authors.

> 统一 LLM 请求/响应检查器 —— [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 插件 一个插件收编四类能力,全部通过配置开关:reasoning 控制、外部思考(think)导出、流量/包分析、会话落盘审计。 ## 功能 | 功能 | 实现机制 | 配置项 | |------|----------|--------| | **reasoning 控制** | 挂 `agent/request` waterfall,改写 `LlmCallConfig.reasoningEffort`(关推理 / 调 budget) | `reasoningEffort` | | **外部思考导出** | 注册 `think` 工具(schema 自动流入请求体)+ `systemPrompt` 注入"先调 think"指令,再从 `llm/stream` 抓回 `thoughts` 参数 | `externalThinking` | | **流量/包分析** | 挂 `llm/stream` waterfall 拦截每个 chunk,按类型统计 token/字符、捕获 reasoning 与 tool-call 块 | `trafficAnalysis` | | **会话落盘审计** | 订阅 `session/event` + 命中的流式块,写入 `audit.jsonl` | `persistSession` | ### 外部思考(external thinking)说明 对**明文返回 reasoning 的模型**(DeepSeek 等开源模型),本插件直接从 `llm/stream` 抓 `reasoning` 块,零侵入。 对**加密推理的模型**(OpenAI / Anthropic / Gemini),原生推理被厂商加密藏起。本插件复刻 [oh-my-pi](https://github.com/can1357/oh-my-pi) 的 externalThinking 思路: 1. `reasoningEffort: 'none'` 关掉原生隐藏推理; 2. 注册一个 `think` 工具(description 为 "private scratchpad; not shown to user"),其 schema 经 `ctx.tools.register()` 自动进入发往 LLM 的请求体; 3. 通过 `systemPrompt.section()` 注入"回答任何问题前必须先调用 think"的指令; 4. 模型把推理写进 `think` 的 `thoughts` 参数,本插件在 `llm/stream` 拦截该 tool-call 块并抓

Read the full READMEThe repository declares no license. Check with the authors before using it.

dsh-llm-inspector DSH plugin questions

How do I install dsh-llm-inspector?

You can install it with the command: `dsh plugin --profile <your profile> add github:cdxiaodong/dsh-llm-inspector`. Make sure you have DeepSeek Harness (DSH) installed and a profile set up. The plugin will be downloaded and registered automatically.

Does this plugin work with OpenAI models?

Yes, it works with OpenAI models, but for external thinking export it uses a 'soft force' approach via system prompt because OpenAI encrypts reasoning. The plugin disables native reasoning by setting `reasoningEffort: 'none'`, then injects a `think` tool and a system prompt to force the model to output its reasoning as a tool call. The trigger rate may not be 100%.

How do I enable traffic analysis?

Set `trafficAnalysis: true` in the plugin configuration under `plugins.dsh-llm-inspector` in your DSH config file. The plugin will then intercept every chunk in the `llm/stream` waterfall, counting tokens, characters, and capturing reasoning and tool-call blocks. You can also use the `inspectorTraffic` service to get a snapshot.

What is the audit log file path?

The default log directory is `.dsh-inspector` relative to the working directory, configurable via `logDir` in the plugin config. The audit file is named `audit.jsonl`. Be careful about the storage location and access permissions, as it may contain sensitive data.

Can I use this plugin without configuring any YAML?

No, the plugin requires at least some configuration to use its capabilities. All four features (`reasoningEffort`, `externalThinking`, `trafficAnalysis`, `persistSession`) are optional and disabled by default. You must set them to `true` or provide a value in your DSH config to activate them.