Expand description
Worker-side index from a model metadata file’s identity to its
on-disk path. When a worker self-hosts metadata, it registers each
file here and rewrites the MDC’s CheckedFile.path to a
/v1/metadata/{namespace}/{component}/{endpoint}/{slug}/{suffix}/{filename}
URL on its own system_status_server. The route handler reads paths
back out by the same key and streams the bytes to the frontend, which
blake3-verifies them against the MDC.
The endpoint triple in the key disambiguates multiple LocalModel
instances coexisting on one DRT (e.g. different roles attaching the
same base model). suffix is the LoRA slug (or "_base" for
non-LoRA), scoping each registration so detaching a LoRA doesn’t
unregister the base model’s files.
Each entry also stores its Owner = (instance_id, lora_slug) so
unregister_for_owner can clean up on detach without the caller
threading the model slug. register returns
Err(CollisionError) on conflict — the caller propagates and the
worker fails to start.
Structs§
- Collision
Error - Registration collided with a different owner — programmer error.
- Metadata
Artifact Registry - Cloning shares the underlying map.
Constants§
- BASE_
SUFFIX - Sentinel
suffixfor non-LoRA registrations. LoRA suffixes areSlug::slugifyoutputs ([a-z0-9_-]+); a name that slugifies to_basewould collide with this sentinel and is not supported.
Type Aliases§
- Owner
(instance_id, lora_slug).Nonelora_slug = base model.