export function isOverflow(usage, contextLimit, outputReserve) {
    const total = (usage.inputTokens ?? 0) +
        (usage.outputTokens ?? 0) +
        (usage.cachedInputTokens ?? 0);
    const available = contextLimit - outputReserve;
    return total > available;
}
export function getTotalTokens(usage) {
    return ((usage.inputTokens ?? 0) +
        (usage.outputTokens ?? 0) +
        (usage.cachedInputTokens ?? 0));
}
//# sourceMappingURL=token-tracker.js.map