Every agent calling a hosted LLM API has the same blind spot: you pay for a flagship model, and nothing in the response proves that's what served you. Providers route, deprecate, and swap models silently. Routing aggregators make it worse — the model name in a response body is self-reported, unverified, and unverifiable after the fact.
This isn't hypothetical. Routing-layer "you got a cheaper model than you paid for" concerns have surfaced repeatedly across aggregator ecosystems, and model substitution complaints are common enough that they've become a known support category.
What we built
We (Correctover) work on independently verifiable evidence for agent behavior. We took the receipt philosophy from our v0.1 tool-call evidence format — signatures protect falsifiability, not bytes — and applied it one layer up: to the model call itself.
@correctover/model-receipt is a zero-dependency Node library (node:crypto Ed25519, no npm deps) that issues a signed receipt for every model call:
{ "receipt_version": "0.2.0", "provider": "openai", "endpoint": "https://api.openai.com/v1/chat/completions", "request_digest": "sha256-base64…", "response_digest": "sha256-base64…", "model_claim": "gpt-4o-2024-11-20", "fingerprint": { "response_len": 42, "token_estimate": 11, "latency_ms": 830, "finish_reason": "stop" }, "prev_receipt_hash": "…or null for genesis", "signature": "…" } Properties:
- Request/response stored as SHA-256 digests only — receipts are safe to hand to auditors, customers, or publish. No plaintext leakage.
- Chained (
prev_receipt_hash): deleting or reordering receipts is detectable. Nonce uniqueness blocks replay. - Signed with Ed25519 over canonical (sorted-key) JSON, so digests are deterministic across runs.
- Verifiable offline by any third party holding receipts + the public key. No dependency on our infrastructure.
The honest boundary — printed in the README, not the footnotes
A receipt proves what the provider claimed, and that neither claim nor bytes were altered after the fact. It does not prove the claim is true — model_claim is self-reported. That's not a caveat we hide; it's the design.
Truth approximation comes from a separate step: matchFingerprint() compares measurable side-evidence (response length, token estimates, finish reasons, latency) against an independent reference library for the claimed model. A mismatch flags a possible downgrade for human review. Fingerprints narrow the question; they don't close it. Anyone selling you "cryptographic proof of which model served you" from the agent side is overselling.
Why this matters beyond debugging
- Routing audit: agent teams comparing aggregators can hold providers to receipts instead of vibes.
- EU AI Act: high-risk-system obligations hit hard in 2026; model provenance records that are independently verifiable — not platform-self-attested — are the form auditors will actually accept.
- Incident forensics: when an agent did something wrong, "which model was serving at that moment" is the first question and currently the first dead end.
Test evidence (the part that keeps us honest)
- 46/46 test vectors pass: benign paths; tamper of every signed field (response digest, model claim, timestamp, fingerprint, endpoint, nonce); wrong-key and malformed-key objects fail cleanly (
key-error, not a crash); chain deletion/reordering/replayed-nonce detected; circular references rejected at issuance; timestamp boundary tests at the exact ±120s skew edges; 20-length chains verify. - Mutation matrix: we delete each production check (signature verification, chain-link validation, replay check, deterministic serialization) in a mutated copy and require the test suite to turn red only in its contract family. If a check is removed and no test goes red, that test was decoration. All four mutations are caught by their own vectors.
- CI on Node 18/20/22 plus a clean-copy replay job (no state, no cache).
Performance, measured (Node v24, single core, 500-byte payload): issue 94 µs, verify 152 µs, 100-receipt chain verify 0.32 ms — against a model call measured in hundreds of milliseconds, receipt overhead is under 0.05% of a call.
What's next
Provider conformance profiles (fingerprint reference libraries per model family), an issuer key directory for third-party verification, and integration with our broader agent-evidence work. The repo is Apache-2.0 licensed, and criticism is welcome: if you can think of an attack on the receipt format that isn't in the vector suite, that's exactly the feedback we want.
- Repo: https://github.com/DSHCorrectover/model-receipt
- License: Apache-2.0