TokenUsage class

Token usage detail (with cache breakdown). Mirrors TokenUsage.ts.

All fields are nullable: total is always serialized by the Rust core (null when unknown), the rest are omitted when None.

Annotations
  • @JsonSerializable.new()

Constructors

TokenUsage({int? total, int? noCache, int? cacheRead, int? cacheWrite, int? text, int? reasoning})
TokenUsage.fromJson(Map<String, dynamic> json)
factory

Properties

cacheRead int?
final
cacheWrite int?
final
hashCode int
The hash code for this object.
no setterinherited
noCache int?
final
reasoning int?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text int?
final
total int?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited