Skip to content

Releases

inferdiff v0.2.0

Choose a tag to compare

@ApacheWang ApacheWang released this 02 Dec 07:31

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, runs D1–D4 in real time, and serves a zero-dependency local dashboard at /_inferdiff/ with redacted findings and frame timelines. Supports --fallback-url pre-first-byte upstream failover (including timeouts before the first body byte of an HTTP 200 stream).
  • Anthropic & Gemini Wire Contracts (C9 / C10): Added C9 for Anthropic /v1/messages and C10 for 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>/io sampling detecting page-cache warming, lookup hits paired with delivery failures, and fragmented reads / storage-backed TTFT regressions.
  • Expanded Offline HTML Waterfall: Added C9/C10 protocol badges and D6–D8 storage 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-out and --metrics-port.
    • inferdiff replay: Offline trace regression gate with --baseline for 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/metrics endpoint with optional --metrics-token Bearer auth and Grafana dashboard.
    • inferdiff.testing zero-dep assertion SDK, opt-in inferdiff.pytest_plugin, inferdiff init CI scaffolder, and inferdiff badge SVG grade badge generator.
    • Updated GitHub Composite Action (action.yml) with bundled release install and sarif-output / junit-output support.
  • 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 clean sdist & wheel installs.

See CHANGELOG.md for the full list of changes.

inferdiff v0.1.1

Choose a tag to compare

@github-actions github-actions released this 26 Nov 02:19

Full Changelog: v0.1.0...v0.1.1

inferdiff v0.1.0

Choose a tag to compare

@ApacheWang ApacheWang released this 26 Nov 01:17

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): Profiles quick, full, and relay covering probes C1–C8 (truncated tool-call JSON lying as completed/stop, reasoning budget starvation, ignore_eos short generation, stripped trailing include_usage / omitted tool-schema tokens, missing delta.role / parallel tool index collisions, multi-byte UTF-8 U+FFFD corruption, buffered fake-SSE bursts, and heterogeneous backend drift), auto-discovering /models and /api/tags, grading wire health A+–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 handshake ttff_ms from real ttft_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 --url POSIX-safe curl reproducers and reflected-secret scrubbing.
  • v0.2 extensibility: inferdiff.trace.v1 and inferdiff.probes.base.BackendProbe reserve 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 inferdiff

Release Attachments

  • inferdiff-0.1.0-py3-none-any.whl & inferdiff-0.1.0.tar.gz — published to PyPI and verified with twine check --strict.
  • case1-waterfall.html — interactive single-file offline HTML frame waterfall for bundled Case 1 (llama.cpp #30773, 18 KiB).