LLMConsumption Serializer
JSON serializer for any LLMConsumption flavor. The on-disk shape is a single object with a top-level "unit" field (the flavor's LLMConsumptionUnit.displayLabel) plus the flavor's own pretty fields. On read, the "unit" label is resolved through LLMConsumptionRegistry to the right decoder — so no provider-specific dispatch lives here.
Properties
Functions
Link copied to clipboard
Decodes a JSON object, resolving its "unit" label through LLMConsumptionRegistry. JSON only.
Link copied to clipboard
Encodes value as a JSON object of its pretty fields plus a "unit" label. JSON only.