Skip to content

AgentPrismPreflightOptions

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

Defines options for the pre-flight context-window check.

public sealed class AgentPrismPreflightOptions

objectAgentPrismPreflightOptions

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

The check estimates prompt token count before a run starts and rejects the call, with no model provider ever contacted, once the estimate exceeds the model’s context window. The estimate is approximate: counting a prompt’s tokens without the provider’s own tokenizer can only approximate the real count, and a wrong count either rejects a call that would have succeeded or lets through one that would have failed.

Disabled by default: a false rejection stops a working agent, and that risk must be opted into, not discovered in production.

public AgentPrismPreflightOptions()

Gets or sets whether the pre-flight context-window check runs. Disabled by default.

public bool Enabled { get; set; }

bool

Gets or sets the share of the context window kept free for the answer, from 0 to 1. Defaults to 0.2 (20%).

public double ReserveRatio { get; set; }

double

A fixed token count would need updating for every new model; a ratio scales with the model’s own window automatically.