wpeng77/dsh-llm-trace ↗★ 0

dsh-llm-trace

捕获并展示模型调用的原始 HTTP 请求与响应 适合需要调试、审计或查看模型接口原始通信报文的 DSH 开发者和高级用户。

包名
dsh-llm-trace
兼容性
待验证
Cordis 依赖范围
^4.0.2
版本
0.1.1
许可证
Apache-2.0
最近更新
2026年9月21日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:wpeng77/dsh-llm-trace

Configuration

Every field is optional. The tab and the page share one config; the tab's mount path is the constant BASE at the top of lib/client.js.

FieldDefaultMeaning
path/llm-traceMount path; absolute, no trailing slash. Changing it also requires editing BASE in lib/client.js.
match['/chat/completions', '/v1/messages', '/v1/responses', '/v1/completions', '/responses']URL substrings selecting a provider call, matched case-insensitively.
matchAllfalseCapture every request regardless of match.
redactHeaders['authorization', 'api-key', 'x-api-key', 'proxy-authorization', 'cookie', 'set-cookie']Header names stored as ``. Set [] to keep them verbatim.
maxRequestBodyBytes8 MiBRetained request-body prefix.
maxResponseBodyBytes32 MiBRetained response-body prefix.
maxRetained500Exchanges retained before the oldest is evicted.
maxJournalBytes256 MiBTotal retained body bytes across all exchanges.

Set them from a profile patch:

- insert:
    - id: llm-trace
      name: 'dsh-llm-trace'
      config:
        match: ['model.example.com']
        maxRetained: 2000