pub type PromptMeasurementSource = MeasurementSource;Aliased Type§
pub enum PromptMeasurementSource {
Native {
provider: String,
},
LocalExact {
tokenizer: String,
},
Heuristic,
}Variants§
Native
The provider’s own token-counting endpoint answered (e.g. Anthropic
messages/count_tokens, OpenAI Responses token counting, Gemini countTokens).
LocalExact
A real BPE tokenizer ran locally, but against a vocabulary that may not be the target
provider’s own (e.g. cl100k standing in for a non-OpenAI vendor) — see
FallbackEstimator (spc_011-C-01) for the concrete counter this describes.
Heuristic
No tokenizer ran at all; this is a coarse guess with a generous safety margin.