Expand description
The batch body identity: what decides whether a re-sent batch_id is a
replay or batch_id_reuse.
The identity is the model, the questions, and each item, the questions
and every item hashed as RFC 8785 (JCS) canonical JSON, with an item’s
images in their canonical form. These are the shared model-batch rules
(cortexkit-model-batch, its RULES.md §2); this module names the
parts classifier/v1 hashes. Canonicalizing first means the key order
of an object state, whitespace, number spellings JSON treats as equal
(1.0 and 1, 1e30 and 1E+30), and the spelling of an image (a
data: URL or {content_type, base64}) can’t turn a retry into a
reuse. max_cost_usd is not part of it: a re-send may carry another
ceiling (see effective_ceiling).
Structs§
- Batch
Identity - A batch’s body identity, as a runner records it at first admission.
- Identity
Error - Why an identity could not be computed: the request holds a value JCS cannot encode, or an image that does not decode.
Functions§
- canonical_
json - The RFC 8785 (JCS) canonical JSON bytes of
value. - digest
- SHA-256 of the canonical JSON of
value, as 64 lowercase hex characters.