Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/core / / RunStateUsageByModel
Interface: RunStateUsageByModel
Defined in: packages/core/src/types/run.ts:45
Per-model usage breakdown carried alongside the aggregate Usage on RunState. Populated by the per-step retry loop when Agent.fallbackModels fires; for runs that never fall back, the map carries a single entry for the primary model with attemptCount: 1.
The aggregate RunState.usage is always the sum of every entry's Usage portion (the field is asserted in tests).
Stable
Indexable
ts
[modelId: string]: Usage & {
attemptCount: number;
}