Skip to content

ContextWindowEstimate

← All HTTP schemas

The result of a pre-flight context-window check, computed without calling the model provider.

Shape: object

Property Required Type Description Rules
promptTokens yes integer (int32) Gets the estimated token count of the prompt. The estimate is approximate. pattern `^-?(?:0\
contextWindowTokens yes integer (int32) 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. pattern `^-?(?:0\
allowedPromptTokens yes integer (int32) Gets the token budget kept for the prompt after AgentPrismPreflightOptions.ReserveRatio is set aside for the answer. null when ContextWindowTokens is unknown. pattern `^-?(?:0\
wouldBeRejected yes boolean 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.