Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/tools / / countTokensHeuristic

Variable: countTokensHeuristic

ts
const countTokensHeuristic: TokenCounter;

Defined in: packages/tools/src/result/truncate.ts:38

Heuristic token counter — 4 chars per token. Matches the fall-through behaviour the agent runtime applies when a per- provider counter is unavailable (offline development; tests).

Stable