Skip to main content

Metering

One run's usage report: how many model calls it made, the input, output and cached input tokens the provider reported for them and their cost in millionths of a US dollar at the run's rate card, in total and for each executor call of the run. A cost no rate card priced is absent, never zero.

loom.metering is one of loom's bounded contexts. All domains.

Types​

ActionUsage​

loom.metering.ActionUsage is a record of six fields:

  • action — String
  • trials — Integer
  • input_tokens — Integer
  • output_tokens — Integer
  • duration_ms — Integer
  • cost_micro_usd — Optional<Integer>, which may be absent

CarriedUsage​

loom.metering.CarriedUsage is a record of two fields:

  • steps — List<loom.metering.StepUsage>
  • effects — loom.metering.EffectsUsage

EffectsUsage​

loom.metering.EffectsUsage is a record of six fields:

  • trials — Integer
  • input_tokens — Integer
  • output_tokens — Integer
  • duration_ms — Integer
  • cost_micro_usd — Optional<Integer>, which may be absent
  • actions — List<loom.metering.ActionUsage>

RunUsageReport​

loom.metering.RunUsageReport is a record of eight fields:

  • commission_run — loom.run.CommissionRunId
  • model_calls — Integer
  • input_tokens — Integer
  • output_tokens — Integer
  • cached_input_tokens — Integer
  • cost_micro_usd — Optional<Integer>, which may be absent
  • steps — List<loom.metering.StepUsage>
  • effects — loom.metering.EffectsUsage

StepUsage​

loom.metering.StepUsage is a record of seven fields:

  • step — Integer
  • label — Optional<String>, which may be absent
  • model_calls — Integer
  • input_tokens — Integer
  • output_tokens — Integer
  • cached_input_tokens — Integer
  • cost_micro_usd — Optional<Integer>, which may be absent

One of the types above is reached by nothing else in this system: loom.metering.RunUsageReport. No entity, view, command, event, error or crossing names it, so it is either vocabulary something outside this specification uses or a leftover — and only a person can tell which.


Generated from loom v1 · model digest 687ce3d39bdb34d56d1fe0c221f558534fa9c3e8eda9e34862b5b742d61331e9 · contract digest slice-sha256/2:29043196dcfcb99e1d2de2d625e53e417f57393d8e8670822d6e623eb620a2e0. Do not edit this file; change the specification and regenerate it with task docs-generate.