← Back to the book

ModelIndex

TMDB for LLMs: a read-only provenance and cryptographic-hash registry that verifies a model file is an untampered copy of the official one

CloudflareD1TypeScriptProvenanceLLM

Published: 6/27/2026

ModelIndex

Think of it as TMDB for LLMs: a read-only provenance and cryptographic-hash registry for machine-learning models. It stores model metadata and per-file content hashes, not the weights themselves, so you can verify that a file or a whole revision is an untampered copy of the official one even after the upstream source goes offline or pulls the model.

Content hash is identity

The core idea is that a file's content hash, not its name or its host, is what identifies it. Look up any hash and ModelIndex returns every model, revision, and path that carries that exact content, each result badged with its source and algorithm. Because sameness is proven by shared hashes rather than matching names, it finds the same file even when it has been renamed or mirrored to a different host.

One namespace across sources

Models from Hugging Face, ModelScope, and CivitAI all live in a single namespace with no source prefix in the URL. A lookup resolves an org and name across every source, picks a stable canonical, and lists the others as "also on" this or that host. Adding a new source is zero new endpoints and zero new schema columns: source is just a field, not a fork of the whole design.

Built for the edge

The whole registry is a Cloudflare Worker backed by D1 (SQLite) with a Drizzle ORM, and every read is a single indexed point lookup, never a table scan, to stay inside a tight per-request CPU budget. Responses are edge-cached through the Cache API with lifetimes that match how mutable each thing is: a pinned revision or a content hash is immutable for a year, while the current view of a model revalidates within a day. The only writer is a separate crawler that posts signed batches to one private endpoint, so the serving side stays strictly read-only.

Why it matters

Model hosts go down, and models get pulled or quietly re-uploaded. ModelIndex keeps the last crawled snapshot and the hashes that prove what a file was, so a vanished repo does not become an unanswerable question.

Take a common failure case: an official model disappears (Microsoft has pulled its own models before), and someone else re-uploads a copy to fill the gap. On its own, that mirror is unverifiable. Nobody can be sure it matches the original rather than a tampered or malicious swap. With a hash on record, anyone can check the re-upload against what was actually published and know in one lookup whether it is the real thing.

It already tracks tens of thousands of models and millions of file hashes, and it is the piece that lets you say, with cryptographic certainty, that the weights you downloaded are the ones that were published.