Repository navigation
Releases
Releases · ApacheWang/inferdiff
inferdiff v0.2.0
Highlights
inferdiff v0.2.0 expands zero-dependency LLM streaming verification (dependencies = [], Python 3.10+) from offline/canary diagnostics into live proxy wire-tapping, multi-provider contracts, non-invasive KV/storage observability, and CI/CD regression gates.
What's New
- Live Zero-Buffering Wire-Tap Proxy (
inferdiff proxy): Forwards SSE/NDJSON bytes as they arrive, runsD1–D4in real time, and serves a zero-dependency local dashboard at/_inferdiff/with redacted findings and frame timelines. Supports--fallback-urlpre-first-byte upstream failover (including timeouts before the first body byte of an HTTP 200 stream). - Anthropic & Gemini Wire Contracts (
C9/C10): AddedC9for Anthropic/v1/messagesandC10for Google Gemini SSE stream termination, token accounting, and wire-contract checks. - Non-Invasive KV & Storage Probes (
D6–D8): Optional LMCache MP, Mooncake Store, and Linux/proc/<pid>/iosampling detecting page-cache warming, lookup hits paired with delivery failures, and fragmented reads / storage-backed TTFT regressions. - Expanded Offline HTML Waterfall: Added
C9/C10protocol badges andD6–D8storage metrics and severity badges. - A/B Compare, Continuous Watch & Offline Replay:
inferdiff compare: A/B canary mode comparing wire contracts, model fingerprints, and timings alongside request replay.inferdiff watch: Scheduled canaries, redacted JSONL logs, webhook failure/recovery alerts, plus--prom-outand--metrics-port.inferdiff replay: Offline trace regression gate with--baselinefor diffing new findings by relative path.inferdiff audit <path|->: Reads SSE, NDJSON, and saved traces from files or stdin with JSON, SARIF 2.1.0, JUnit XML, and GitHub Issue exports.
- Observability & Developer Ergonomics:
- Prometheus
/_inferdiff/metricsendpoint with optional--metrics-tokenBearer auth and Grafana dashboard. inferdiff.testingzero-dep assertion SDK, opt-ininferdiff.pytest_plugin,inferdiff initCI scaffolder, andinferdiff badgeSVG grade badge generator.- Updated GitHub Composite Action (
action.yml) with bundled release install andsarif-output/junit-outputsupport.
- Prometheus
- Hardening & Reproducible Fault Matrix: Bounded streaming captures and replay inputs, clean proxy/metrics socket teardown, hardened credential redaction, and a local HTTP 200 fault benchmark (15/15 faults + 5/5 healthy controls + 2/2 pre-body failover recoveries).
Verification
- Linux (Python 3.11,
pytest -W error): 261 passed, 284 subtests passed - Windows (Python 3.12,
pytest -W error): 261 passed, 284 subtests passed - Zero runtime dependencies (
dependencies = []) verified with cleansdist&wheelinstalls.
See CHANGELOG.md for the full list of changes.
inferdiff v0.1.1
Full Changelog: v0.1.0...v0.1.1
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).