public promptTokenCount(request as LLMRequest) as Long
Counts the exact rendered prompt, including template markers, without allocating inference states. Does not mutate or retain the request.
count = provider.promptTokenCount(LLMRequest(messages))