Repository navigation
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.