.NET API
RunNonTokenCost
Tracon.Abstractions.dllWhat a run spent that is not tokens: the amounts its workflow function nodes and its tools reported, added up in one currency.
public sealed record RunNonTokenCost : IEquatable<RunNonTokenCost>- Inheritance
- object ← RunNonTokenCost
- Implements
- IEquatable<RunNonTokenCost>
- Inherited Members
- object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”A run’s token cost (RunCost) is priced by Tracon from the model’s usage. A text-to-speech character, a render second or a GPU hour is not a token: the code that did the work reports its own amount (ToolCallUsage.Cost). The reported amounts of one currency add up here, in a total of their own. It is not a term of RunCost.Total (a token total and a reported amount are different measurements, and RunCost stays a price snapshot of one model’s tokens). A caller that needs “what did this run spend” adds the two with RunSpend and nothing else.
The value is a snapshot written once when the run closes. Items reported after that are kept in the run’s detail (IRunStore.ListNonTokenUsageAsync) and do not change it. A run that reported nothing holds null, not zero.
Constructors
Section titled “Constructors”RunNonTokenCost()
Section titled “ RunNonTokenCost()”public RunNonTokenCost()Properties
Section titled “Properties”Amount
Section titled “ Amount”Gets the sum of the reported amounts that were added, or null
when no reported item carried an amount in Currency.
public decimal? Amount { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”null says “nothing here could be priced”, not “it was free”: zero would claim a measurement nobody made. The same rule as the token cost’s total.
Currency
Section titled “ Currency”Gets the currency of Amount, taken from
Tracon:Pricing:Currency (an item that names no currency is in it).
public string? Currency { get; init; }Property Value
Section titled “Property Value”CurrencyCount
Section titled “ CurrencyCount”Gets how many currencies the added amounts are in: 0 or 1 for one run, which adds in one currency.
public int CurrencyCount { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”A tree total (RunRecord.TreeNonTokenCost) adds the runs’ totals, and
the runs can be in different currencies. Amounts in two currencies are never
added: above one, Amount and Currency are null, and
each run keeps its own total. Currencies are compared without regard to letter case.
IsEstimated
Section titled “ IsEstimated”Gets whether any added amount rests on an estimated quantity
(ToolCallUsage.IsEstimated).
public bool IsEstimated { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”An estimated amount is added, and this flag says so: leaving it out would let a tenant’s quota run past its ceiling on a quantity nobody measured.
UnsummedItemCount
Section titled “ UnsummedItemCount”Gets how many reported items are not part of Amount: items with no
amount, and items in another currency than Currency.
public int UnsummedItemCount { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”A quota or budget cannot count such an item. The count is what keeps that gap visible instead of reading as a smaller bill.
Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(RunNonTokenCost?)
Section titled “ Equals(RunNonTokenCost?)”public bool Equals(RunNonTokenCost? other)Parameters
Section titled “Parameters”other RunNonTokenCost?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(RunNonTokenCost?, RunNonTokenCost?)
Section titled “ operator ==(RunNonTokenCost?, RunNonTokenCost?)”public static bool operator ==(RunNonTokenCost? left, RunNonTokenCost? right)Parameters
Section titled “Parameters”left RunNonTokenCost?
right RunNonTokenCost?
Returns
Section titled “Returns”operator !=(RunNonTokenCost?, RunNonTokenCost?)
Section titled “ operator !=(RunNonTokenCost?, RunNonTokenCost?)”public static bool operator !=(RunNonTokenCost? left, RunNonTokenCost? right)Parameters
Section titled “Parameters”left RunNonTokenCost?
right RunNonTokenCost?