pages / example / model_delivery
canister coord://offchain/genie/program/model_delivery@v1/ee1fc76c9c8612ee · v1 · artifact root 0xee1fc76c9c8612ee26ff47963e3a31a8573db0c6f55204bd717e73c1b5b15779 · previous none (first version) · superroot at publish not sealed yet
sealed cases that reached it: 0 — sealed cases that reached this word (the store counts, never reads)
model delivery (a .genie program) in the studio: 6 symptoms, 6 fixes
// _MODEL_DELIVERY_v1_ (owner 2026-10-27: "how do buyers know which model they buy? how is this checked by venice / near? this needs to // be natively sorted on genie / lang/cue"). One inference request, from the name the buyer sent to an answer the buyer can check or a // refusal that costs nothing. The names, the cards and the proofs are lang/cue/models.cue (lang/gen/models.json): a name resolves to // one model or to nothing; a class id is no name; an answer whose `model` is not the card's venue id is refused; an attested card's // answer is delivered only after its signature recovers to the attested address. From each state the first move whose `when` holds is // taken. The wall (taifoon-web lib/inference-route) measures the facts and walks this machine; the receipt names model, venue, venue // id, quantization and proof. Nothing here pays or signs: a refusal voids the buyer's reserve. genie model_delivery v1 about "Deliver one inference request as the model the buyer named, with the proof its venue gives, or refuse it without a charge" agent model_request is "one buyer request for a model, from the name it sent to a checked answer or a refusal that costs nothing" states requested resolved routed answered verified delivered refused_class refused_unknown refused_unavailable refused_failed refused_mismatch refused_unverified start requested final delivered refused_class refused_unknown refused_unavailable refused_failed refused_mismatch refused_unverified read GET /v1/models as models // the name: exactly one model, or nothing (a class id is answered with the models of its class) move requested -> resolved when name.resolves == true move requested -> refused_class when name.class == true move requested -> refused_unknown // a card of that model on a venue that delivers now (key on the deployment, last check not delisted) move resolved -> routed when card.deliverable == true move resolved -> refused_unavailable move routed -> answered when answer.ok == true move routed -> refused_failed // the answer's own model field is the card's venue id, or the answer is not this model move answered -> refused_mismatch when answer.model_matches != true move answered -> verified when card.proof == "attested" and attest.ok == true move answered -> refused_unverified when card.proof == "attested" move answered -> delivered move verified -> delivered refuse no_name "a request names a model: its id, its Hugging Face repo or a venue's id for it (GET /v1/models)" say requested "A buyer asked for a model by name" say resolved "The name is one model of the table: its weights, its cards" say routed "The cheapest card of that model that delivers now took the request" say answered "The venue answered" say verified "The venue's enclave attestation and the answer's signature check: these weights answered" say delivered "Delivered: the receipt names the model, the venue, the venue's id, the quantization and the proof" say refused_class "Refused: a price class is no model; the buyer is shown the models of the class, nothing is charged" say refused_unknown "Refused: no model of the table has that name; nothing is charged" say refused_unavailable "Refused: no card of that model delivers now; nothing is charged" say refused_failed "Refused: the venue did not answer; nothing is charged" say refused_mismatch "Refused: the venue answered as another model; nothing is charged and the card is delisted" say refused_unverified "Refused: the attestation or the signature did not check; nothing is charged and the card is delisted" next requested resolved "The table resolves the name; never a near match, never another model" next answered delivered "The answer's model is checked against the card, and an attested card's signature against its enclave" knowledge symptom "a buyer of one model is served another" caused_by "a card was listed under a price class (llama-3.1-8b) while its venue served other weights" fixed_by "a card serves one row of models.cue; its listing is gpu:<model id>:<venue>" symptom "a request for deepseek-v3 is served DeepSeek V3.2" caused_by "the wall fell back from a model name to its class" fixed_by "a class id is no name: refused_class with the models of the class" symptom "the receipt names the model the wall asked for, not the one that answered" caused_by "the answer's model field was replaced by the requested id when the venue omitted it" fixed_by "answer.model_matches reads the venue's own field; a missing field does not match"