Ir al contenido
↑↓Navigate↵SelectescClose

Registry artifact format

Canonical registry bundles, pricing constraints, digests, and signature validation

Esta página aún no está disponible en tu idioma.

nexus-registry-artifact defines the offline interchange format for model catalog, endpoint capability, support, and exact pricing data. It has no database or network dependency.

An artifact contains these files:

manifest.json
models.jsonl
aliases.jsonl
endpoints.jsonl
rate_cards.jsonl
qualified_rates.jsonl
tombstones.jsonl
provenance.jsonl

Schema version 1 requires every dataset descriptor and file, including empty datasets. All object types reject unknown fields. Enum values are closed, so unknown providers, meters, billing units, qualifiers, modalities, and classifications fail decoding.

manifest.json is compact JSON followed by one newline. Each JSONL record is compact JSON followed by one newline. Records sort by their stable record identifier (aliases sort by alias). Manifest dataset descriptors and authoritative scopes sort by their enum identity. Map keys use BTreeMap ordering. Parsing rejects any byte representation that is not this canonical form.

Dataset descriptors bind each JSONL file by lowercase SHA-256 and record count. The artifact digest is SHA-256 over a domain separator, the canonical manifest with its signature removed, and all canonical datasets in DatasetKind::ALL order. Ed25519 signatures cover the same bytes. Signature metadata carries the algorithm, allowlisted key identifier, and base64 signature; the consumer supplies the trusted verifying key.

  • Decimal prices are JSON strings in plain notation. Their original scale is preserved; JSON numbers, exponent notation, signs, leading zeroes, and incomplete fractions are rejected.
  • Every endpoint, alias, rate card, support classification, tombstone, and model references existing records and provenance where applicable.
  • Endpoint records explicitly carry enabled and active_service_tier. Endpoint capabilities must fit the model modalities. Tools and streaming require a conversational request capability.
  • Qualified rates use the supported meter/billing-unit pairs and the closed cache_ttl and tool_type qualifier vocabulary. Qualifier values and meter combinations are closed. Every qualified identity starts at context token 0; its half-open context bands are contiguous and non-overlapping, and its final band is unbounded.
  • Rate cards distinguish desired activation intervals from normalized source intervals. Qualified rates carry the normalized source interval as well. Activation intervals are RFC 3339 half-open intervals and cannot overlap for the same provider and canonical model.
  • Enabled endpoints require capability-dependent base-rate coverage in their active service tier.
  • Omitted records are always preserved. A tombstone is only valid when it falls within an authoritative provider/dataset scope (RegistryArtifact::validate rejects tombstones outside that scope). Model tombstones retire only the named provider’s endpoints. Rate card and qualified-rate tombstones supersede activations; immutable pricing rows are never deleted. Interpreting tombstones into concrete deletions is an importer responsibility (see nexus-registry), not part of this crate’s API.
  • Bedrock and Bedrock GovCloud records decode normally, but their endpoints must be marked non_routable; RegistryArtifact::validate rejects an enabled endpoint whose routability is non_routable.

Call RegistryArtifact::validate before consuming an in-memory artifact. RegistryArtifact::from_files performs strict decoding, digest/count checks, canonical-byte checks, and offline validation. Call verify_signature with the expected key identifier and trusted Ed25519 public key before accepting a signed artifact.