Chat works. Tools don’t. Find what changed in the stream.
A dependency-free, offline checker for captured Chat Completions SSE responses. Use it in your browser or from Node.js. Compare two captures from the same request, one before and one after a gateway, to find dropped or changed function calls.
Open the tool · Support this work · Report a gap
Run the dropped-call example · Read the debugging case
中文:这是一个本地流记录排错工具。它检查索引缺失、参数损坏、并行调用串线、未结束的流,也能比较网关前后的调用内容。页面支持中英文切换。没有上传、账号、API 密钥或模型调用。
Requires Node.js 20+ for the CLI; no package installation is necessary.
git clone https://github.com/LIghtJUNction/Inspiration.git
cd Inspiration
node bin/stream-check.mjs --helpCheck an existing capture:
node bin/stream-check.mjs capture.sse
node bin/stream-check.mjs capture.sse --json
node bin/stream-check.mjs capture.sse --out report.jsonCompare two sides of a gateway:
node bin/stream-check.mjs upstream.sse --compare gateway.sse --jsonThe included demo demonstrates a case that a single-stream validator misses: each capture is valid, but the downstream response has one fewer function call.
node --input-type=module -e 'import { compare } from "./docs/analyzer.mjs"; import { valid, dropped } from "./docs/examples.mjs"; console.log(JSON.stringify(compare(valid, dropped), null, 2))'Run the page locally with Python 3:
npm start
# Open http://127.0.0.1:4173Use -N -o capture.sse on your existing curl request, with stream:true in its JSON body. Save only the response body. Do not use -i to include headers. Keep credentials in your own terminal configuration; this tool never needs them. The checker itself makes no network requests or billable model calls.
Accepted input: UTF-8 SSE body, up to 10 MiB and 40,000 dispatched events per capture. CR, LF, CRLF, comments, multiline data and the final blank-line rule are handled. A final event without a blank line is reported as pending rather than silently accepted.
- Choice and tool indexes, including zero and sparse indexes.
- Interleaved parallel function calls; missing, duplicated or conflicting call identities.
- Function arguments after all fragments are reassembled, not after each fragment.
- Finish reasons, in-stream errors, missing completion markers and data after termination.
- Differences in decoded function names/arguments per choice across a gateway, ignoring valid call-ID/index remapping and JSON object key order.
If either capture has structural errors or warnings, comparison is inconclusive. It does not claim the gateway lost data from an incomplete capture. The two files must represent the same request; independently generated answers are not comparable evidence.
| Exit | Meaning |
|---|---|
0 |
Supported checks passed, or warnings only |
1 |
Structural failure, a detected difference, or inconclusive comparison |
2 |
Input/configuration error or unsupported/unrecognized protocol |
--strict also exits 1 for warnings. --out creates a new report with mode 0600 and refuses to overwrite an existing file. Standard output never prints captured response content.
Reports are assembled from an allowlist of structural fields: rule codes, fixed explanations, event/line/choice/tool indexes, verdicts and counts. They exclude captured text, tool names, argument values, call IDs, model names, input filenames and headers. Structural metadata still reveals counts and positions; review a report before sharing it.
The browser uses no analytics, external fonts, storage or API calls. Its content security policy blocks connections. The hosting provider necessarily receives the normal page request. Donation, source and feedback links are external and open only when clicked. Closing the tab discards the capture from the tool; browser extensions and your browser’s own behavior are outside this tool’s control.
This is not full API certification. It does not validate tool schemas, custom tools, deprecated function calls, Responses/Anthropic streams, HTTP headers, HAR files, live client behavior, model quality, transport timing or the cause of a timeout. JSON comparison uses JavaScript number semantics; unsafe integers are flagged and make comparison inconclusive. A passing check is limited to this capture and these rules.
Existing tools such as Brace, CloudOps Toolkit and CompatCanary cover neighboring needs. This experiment focuses on a local structural gate and paired capture comparison. It does not claim to be the first stream parser.
npm test
git diff --checkTests run locally with Node’s built-in runner. No CI workflow is installed. The static site lives in docs/, and the CLI imports the same analyzer the browser uses.
Research, demand evidence and the commercial hypothesis are recorded in the experiment notes. A public issue is a problem report, not proof of willingness to pay. A deployed tool is not revenue.
If this saves debugging time, you can make a voluntary donation. Donations do not unlock features, buy a fix or establish a service commitment. The payment site’s existing terms are preserved.
MIT licensed.