Skip to content

HarnessContextMeasurementUnit

NexusLabs.Foundry.MicrosoftAgentFramework

NexusLabs.Foundry.MicrosoftAgentFramework.Diagnostics

HarnessContextMeasurementUnit Enum

The explicit unit a Harness.Context.IHarnessContextSizeEstimator reports its integer size estimates in. Every size, threshold, and limit carried by HarnessContextDiagnostics is expressed in whatever unit the estimator that produced it declares — this enum exists so a generic integer is never silently mislabeled as a provider token count.

public enum HarnessContextMeasurementUnit

Fields

Utf8Bytes 0

The estimator counts UTF-8 bytes of the model-facing content it measures. Never a provider token estimate, even though byte counts and token counts are sometimes loosely correlated.

EstimatedTokens 1

The estimator reports a provider- or tokenizer-derived token estimate. Reserved for a future estimator that is actually backed by a tokenizer; no estimator in this codebase reports this unit today.

HostDefinedUnits 2

The estimator reports host- or test-defined arbitrary units with no byte or token meaning at all — for example a fixed or constant fixture size used to make trigger-threshold arithmetic deterministic in tests.