← All changelog entries

Document payloads omit absent fields instead of returning null

A field the document does not have is now left out of processed_data; templates bound the keys a payload may contain.

Every extraction payload was padded to its full template: a key the document did not carry came back as null, and a long invoice delivered dozens of them. Payloads now contain only the keys with a real value. The model is instructed to omit unknown fields, and any null it still emits is dropped before delivery.

Arrays and objects are unchanged: summary_data is always an object and lineItems always an array, so shape checks keep working. Treat every scalar as optional. Code that reads a key with a fallback is unaffected; code that asserts a key exists needs the fallback.