Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/agent / run-state / aggregateUsageFromByModel

Function: aggregateUsageFromByModel()

ts
function aggregateUsageFromByModel(byModel): Usage;

Defined in: packages/agent/src/run-state/index.ts:363

Recompute the aggregate usage from usageByModel. Returns the sum that callers can compare against state.usage to verify the per-step retry loop maintained the documented invariant.

Parameters

ParameterType
byModel| RunStateUsageByModel | undefined

Returns

Usage

Stable