ContextWindowEstimate
AgentPrism.Abstractions.dllThe result of a pre-flight context-window check, computed without calling the model provider.
public sealed record ContextWindowEstimate : IEquatable<ContextWindowEstimate>Inheritance
Section titled “Inheritance”object ← ContextWindowEstimate
Implements
Section titled “Implements”IEquatable<ContextWindowEstimate>
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Section titled “Constructors”ContextWindowEstimate()
Section titled “ ContextWindowEstimate()”public ContextWindowEstimate()Properties
Section titled “Properties”AllowedPromptTokens
Section titled “ AllowedPromptTokens”Gets the token budget kept for the prompt after
AgentPrismPreflightOptions.ReserveRatio is set aside for
the answer. null when ContextWindowTokens is unknown.
public required int? AllowedPromptTokens { get; init; }Property Value
Section titled “Property Value”int?
ContextWindowTokens
Section titled “ ContextWindowTokens”Gets the model’s context window size, taken from the model catalog’s
ModelDescriptor.ContextWindowTokens.
null when the model is not found in the catalog.
public required int? ContextWindowTokens { get; init; }Property Value
Section titled “Property Value”int?
PromptTokens
Section titled “ PromptTokens”Gets the estimated token count of the prompt. The estimate is approximate.
public required int PromptTokens { get; init; }Property Value
Section titled “Property Value”WouldBeRejected
Section titled “ WouldBeRejected”Gets whether a real run with this prompt would be rejected by the
pre-flight check. Always false when
ContextWindowTokens is unknown — an unknown window can never
be exceeded.
public required bool WouldBeRejected { 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(ContextWindowEstimate?)
Section titled “ Equals(ContextWindowEstimate?)”public bool Equals(ContextWindowEstimate? other)Parameters
Section titled “Parameters”other ContextWindowEstimate?
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 ==(ContextWindowEstimate?, ContextWindowEstimate?)
Section titled “ operator ==(ContextWindowEstimate?, ContextWindowEstimate?)”public static bool operator ==(ContextWindowEstimate? left, ContextWindowEstimate? right)Parameters
Section titled “Parameters”left ContextWindowEstimate?
right ContextWindowEstimate?
Returns
Section titled “Returns”operator !=(ContextWindowEstimate?, ContextWindowEstimate?)
Section titled “ operator !=(ContextWindowEstimate?, ContextWindowEstimate?)”public static bool operator !=(ContextWindowEstimate? left, ContextWindowEstimate? right)Parameters
Section titled “Parameters”left ContextWindowEstimate?
right ContextWindowEstimate?