Repository navigation
inferdiff v0.1.0
inferdiff v0.1.0
Wireshark & protocol bill-checker for streaming LLM APIs — zero third-party runtime dependencies (Python 3.11+ standard library only).
Now live on PyPI with OIDC Trusted Publisher attestations: https://pypi.org/project/inferdiff/
Highlights
- Zero-setup live canary suite (
inferdiff doctor): Profilesquick,full, andrelaycovering probesC1–C8(truncated tool-call JSON lying ascompleted/stop, reasoning budget starvation,ignore_eosshort generation, stripped trailinginclude_usage/ omitted tool-schema tokens, missingdelta.role/ parallel tool index collisions, multi-byte UTF-8U+FFFDcorruption, buffered fake-SSE bursts, and heterogeneous backend drift), auto-discovering/modelsand/api/tags, grading wire healthA+–F. - Chunk-jitter-tolerant wire recording & frame diff (
record,audit,diff,compare): Native adapters for OpenAI Chat Completions, OpenAI/v1/responses, SGLang/generate, and Ollama NDJSON; strict RFC 9112 framing; separates empty handshakettff_msfrom realttft_effective_ms; deterministic CI exit codes (0/1/2/3). - Single-file airgap-safe HTML5 + SVG frame waterfall (
--html): Hash-locked CSP (script-src 'sha256-...'), zero external CDN/fonts, adaptive segment folding strictly< 80 KiB. - Upstream-ready sanitized exports (
export):<=25-line redacted GitHub Issue Markdown with--globoff --urlPOSIX-safecurlreproducers and reflected-secret scrubbing. - v0.2 extensibility:
inferdiff.trace.v1andinferdiff.probes.base.BackendProbereserve the three-point snapshot hook (T_pre -> T_ttft -> T_eof) for non-invasive KV & storage probes.
Install / Zero-Install Quickstart
# Zero-install via uvx
uvx inferdiff doctor http://127.0.0.1:8080/v1 --html doctor.html
# Or install from PyPI (Python 3.11+, zero runtime dependencies)
pip install inferdiffRelease Attachments
inferdiff-0.1.0-py3-none-any.whl&inferdiff-0.1.0.tar.gz— published to PyPI and verified withtwine check --strict.case1-waterfall.html— interactive single-file offline HTML frame waterfall for bundled Case 1 (llama.cpp #30773,18 KiB).