UsageModelTotals class final

Integer token totals for one scope (a segment, one model's slice of a scope, or the cumulative total).

Constructors

UsageModelTotals({int requests = 0, int input = 0, int output = 0, int cacheRead = 0, int cacheWrite = 0, int? reasoning})
Creates UsageModelTotals.
const
UsageModelTotals.totalsFrom(Map<String, dynamic> json)
Deserializes the flat integer fields from json.
factory

Properties

cacheRead → int
Input tokens served from a provider cache.
final
cacheWrite → int
Input tokens written into a provider cache.
final
hashCode → int
The hash code for this object.
no setterinherited
input → int
Prompt (input) tokens.
final
output → int
Completion (output) tokens.
final
reasoning → int?
Reasoning/thinking tokens, when at least one contributing provider reported them; null when no contributor did.
final
requests → int
Number of provider requests folded into this scope.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
totalsJson() → Map<String, dynamic>
The flat integer fields in schema order (shared by UsageSegment and UsageLedgerTotal serialization — one shape, two hosts).

Operators

operator +(UsageModelTotals other) → UsageModelTotals
Adds other into a new UsageModelTotals.
operator ==(Object other) → bool
The equality operator.
inherited

Constants

zero → const UsageModelTotals
Every field zero.