DIM · Dagon Inference Marketplace

Model identity and route_id

Buyers do not shop for "Llama 70B". They shop for an exact model identity: one set of weights, one quantization, one serving configuration. Two sellers with byte-identical identities sell the same product and compete on price and measured performance. A different revision or quantization is a different product.

The identity object

{
  "family": "llama-3.3-70b-instruct",
  "revision": "WEIGHTS_REVISION",
  "quantization": "fp8",
  "serving": { "engine": "vLLM", "engine_version": "0.8.5", "gpu": "NVIDIA H100 80GB", "gpu_count": 2, "max_concurrency": 64 }
}
Field What to put there
family The model family buyers filter on (GET /v1/routes?family=). Use the name other sellers of the same model use.
revision The exact weights, for example the Hugging Face commit hash.
quantization bf16, fp8, int4, ... exactly as served.
serving.engine, engine_version The inference engine and its version.
serving.gpu, gpu_count Accelerator model and count behind the route. gpu_count may be 0 (for example a hosted API).
serving.max_concurrency Concurrent requests the route admits. The gateway uses it as the admission limit and as max_concurrency in capacity reports.

All strings must be non-empty (verifiers also cap them at 256 characters); integers are non-negative, and max_concurrency is at least 1. The onboarding wizard applies stricter form limits (for example gpu_count from 1 to 512).

The two hashes

model_identity_id = SHA256(jcs(model_identity))
route_id          = SHA256(jcs({ seller_id, endpoint, model_identity_id, nonce }))

Both are lowercase hex. jcs is RFC 8785 canonical JSON, so formatting does not matter but every character of every value does: "fp8" and "FP8" are different identities. The route hash covers exactly those four fields; nonce must be 64 lowercase hex characters.

Recompute them yourself from the repository (from services/gateway, where @im/protocol resolves):

cd services/gateway
bun -e 'import { modelIdentityId, routeId } from "@im/protocol";
const hex = (b) => Buffer.from(b).toString("hex");
const identity = { family: "llama-3.3-70b-instruct", revision: "WEIGHTS_REVISION", quantization: "fp8",
  serving: { engine: "vLLM", engine_version: "0.8.5", gpu: "NVIDIA H100 80GB", gpu_count: 2, max_concurrency: 64 } };
const id = hex(modelIdentityId(identity));
console.log(id);
console.log(hex(routeId({ seller_id: "GUUbVoGEge8fGv6GfZtqRfCCCxRzX7NAcDF1EjeinYMA",
  endpoint: "https://gpu.example.com/v1/chat/completions", model_identity_id: id,
  nonce: "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" })));'

It prints 5bc5a04f7ae87f1f1856a8ca503c6ac08ed69b40dcf082495a4e1f666ab1f7fd and a19636a556af82613e788bb2e7c32d084902d99b1f04ede436642d90b819f245, the values in the example listing.

Consequences you should plan for

  • Changing concurrency changes the route. max_concurrency is inside the identity, so raising it gives a new model_identity_id and a new route_id. Publish the new route next to the old one and retire the old one after buyers move.
  • Changing the endpoint or nonce changes the route, even with the same model.
  • The identity is a claim. The listing signature proves that you said it, not that the weights match. Probes measure latency, throughput and availability; nothing in the MVP verifies the weights, revision or quantization behind an endpoint. Describe exactly what you serve: a wrong identity is a misrepresentation buyers can prove with your own signature.
  • Buyers pin identities, not families. The SDK never substitutes an identity because its family matches; a buyer that accepts several equivalent identities lists their IDs explicitly.
  • Routers. If your route may send requests to different upstreams, the architecture treats it as a pooled route whose measurements describe the pool. Only pool upstreams that serve the identical identity.

The route is what everything references

route_id appears in every Hold (IM/HOLD/1), every receipt (IM/RECEIPT/1), every capacity report, every probe observation and every indexer response. The receipt also carries model_identity_id, so a buyer can prove which identity it was billed for.