🔎 dsh-llm-trace-plugin — see the literal bytes on the wire between Harness and the LLM API #5852
Replies: 1 comment 1 reply
|
Nice tool — real wire-level visibility without a proxy is a genuinely useful gap to fill, and riding 1. Capture coverage is only as good as the
2. Redaction scope: "credentials redacted" — make sure that covers URL query strings and Also worth stating in the README: because this patches the process-global fetch, it belongs in a debugging profile and should probably refuse to load alongside other fetch-mutating plugins — the single-global-slot constraint is real. Solid contribution to the debugging niche — the ecosystem benefits from more "see what actually happens" tools like this (cf. dsh-llm-oauth from #5845, subagent-wait, etc.). |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
English version
🔎 dsh-llm-trace-plugin — see the literal bytes on the wire between Harness and the LLM API
What it does: patches
globalThis.fetchto capture the exact HTTP request/response of every LLM provider call Harness makes — raw headers, raw JSON bodies, raw SSE frames — and shows them in a Wire Trace tab right inside the session UI. No proxy, no mitmproxy, no extra process.Why it's useful for learning Harness ↔ LLM API:
dsh-llm-deepseek/dsh-llm-pi-aiactually send: real provider field names, real headers, the real streaming frame sequence — not the normalizedGenerateOptions/StreamChunkobjects Harness builds on top.llm/stream+session/event, so you can map "this exact wire call" back to "this exact point in the conversation loop" — without reading Harness internals.jq-shaped, foldable JSON viewer (global depth stepper + per-row fold) makes even huge 1M-token request bodies and reassembled SSE deltas actually readable.Why it's useful for debugging LLM API issues:
curl-replayable capture of the literal request — reproduce a failing call outside Harness entirely, headers and body included (credentials redacted, obviously).Install:
Restart
dsh webafter installing.Repo / docs: https://github.com/lastorder/dsh-llm-trace-plugin (bilingual README, architecture doc, plugin-development notes)
Category: Debugging / Developer Tools
中文版本
🔎 dsh-llm-trace-plugin —— 直接看到 Harness 与 LLM API 之间线上的原始字节
它是什么: 通过替换
globalThis.fetch,捕获 Harness 发出的每一次 LLM provider 调用的真实 HTTP 请求/响应——原始 header、原始 JSON body、原始 SSE 帧——并在 session 界面内的 Wire Trace 标签页里直接查看。不需要代理、不需要 mitmproxy、不需要额外进程。为什么适合用来学习 Harness 与 LLM API 的关系:
dsh-llm-deepseek/dsh-llm-pi-ai实际发送了什么:真实的 provider 字段名、真实的 header、真实的流式帧序列——而不是 Harness 在此之上构建的、provider 无关的GenerateOptions/StreamChunk对象。llm/stream与session/event两个公开扩展点观察得到——不需要阅读 Harness 源码,就能把"这次具体的线上调用"对应回"对话循环中的具体位置"。jq风格、可折叠的 JSON 查看器(全局深度步进 + 逐行折叠),让哪怕是百万 token 级的超大请求体、以及重新拼装后的 SSE 增量,也能真正可读。为什么适合用来 debug LLM API 相关问题:
curl重放——完全脱离 Harness 复现失败调用,header 和 body 都在(凭证 header 已脱敏)。安装:
安装后需要重启
dsh web。仓库 / 文档: https://github.com/lastorder/dsh-llm-trace-plugin (中英双语 README,架构文档,插件开发说明)
分类:调试 / 开发者工具
All reactions