Summary
When checkpoint metadata is serialized, the model field may be omitted entirely due to omitempty on the JSON tag. This makes it harder for downstream consumers to distinguish between "model unknown" and "field missing".
Solution
Remove omitempty from the Model JSON struct tag so the field is always present (empty string when unknown, never missing). Ensure all agent detection code paths populate the model field when available from session data.
Why
Consistent metadata schema makes downstream consumption (dashboards, analytics, web UI) simpler and more reliable. Consumers don't need to handle both missing key and empty value cases.
Source
Inspired by entireio/cli#882
Summary
When checkpoint metadata is serialized, the model field may be omitted entirely due to
omitemptyon the JSON tag. This makes it harder for downstream consumers to distinguish between "model unknown" and "field missing".Solution
Remove
omitemptyfrom the Model JSON struct tag so the field is always present (empty string when unknown, never missing). Ensure all agent detection code paths populate the model field when available from session data.Why
Consistent metadata schema makes downstream consumption (dashboards, analytics, web UI) simpler and more reliable. Consumers don't need to handle both missing key and empty value cases.
Source
Inspired by entireio/cli#882