RunTreeCost
AgentPrism.Abstractions.dllTotal cost of a run tree (the root plus every child run).
public sealed record RunTreeCost : IEquatable<RunTreeCost>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”This must not be added to RunRecord.Cost: the value already includes the root’s own cost, for the same reason as RunRecord.TreeUsage. The user interface shows the two in separate columns.
Constructors
Section titled “Constructors”RunTreeCost()
Section titled “ RunTreeCost()”public RunTreeCost()Properties
Section titled “Properties”CachedInputCost
Section titled “ CachedInputCost”Gets the total cached-input cost across the tree.
public decimal? CachedInputCost { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”This is a THIRD addend of the tree’s total, not a subset of RunTreeCost.InputCost: every run’s own RunCost.InputCost already has its cached tokens subtracted out. A total that adds only input and output under-reports every tree that hit the prompt cache.
Currency
Section titled “ Currency”Gets the currency.
public string? Currency { get; init; }Property Value
Section titled “Property Value”InputCost
Section titled “ InputCost”Gets the total input cost across the tree.
public decimal? InputCost { get; init; }Property Value
Section titled “Property Value”OutputCost
Section titled “ OutputCost”Gets the total output cost across the tree.
public decimal? OutputCost { get; init; }Property Value
Section titled “Property Value”RunsWithUnknownPricing
Section titled “ RunsWithUnknownPricing”Gets how many runs in the tree have an unknown price.
public long RunsWithUnknownPricing { get; init; }Property Value
Section titled “Property Value”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(RunTreeCost?)
Section titled “ Equals(RunTreeCost?)”public bool Equals(RunTreeCost? other)Parameters
Section titled “Parameters”other RunTreeCost?
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”Total()
Section titled “ Total()”Gets the tree’s total cost — input, output and cache read together.
public decimal? Total()Returns
Section titled “Returns”null when no run in the tree was ever priced.
Remarks
Section titled “Remarks”Same rule as RunCost.Total: never add only two of the three.
Operators
Section titled “Operators”operator ==(RunTreeCost?, RunTreeCost?)
Section titled “ operator ==(RunTreeCost?, RunTreeCost?)”public static bool operator ==(RunTreeCost? left, RunTreeCost? right)Parameters
Section titled “Parameters”left RunTreeCost?
right RunTreeCost?
Returns
Section titled “Returns”operator !=(RunTreeCost?, RunTreeCost?)
Section titled “ operator !=(RunTreeCost?, RunTreeCost?)”public static bool operator !=(RunTreeCost? left, RunTreeCost? right)Parameters
Section titled “Parameters”left RunTreeCost?
right RunTreeCost?