import { approximateTokens } from "../../query/promptCache.js";
export function buildRequestDiagnostics(input) {
    return {
        provider: input.provider,
        model: input.model,
        kind: input.kind,
        stablePrefixHash: input.stablePrefixHash,
        systemChars: input.systemText.length,
        userChars: input.userText.length,
        approxPromptTokens: approximateTokens(`${input.systemText}\n${input.userText}`),
        createdAtMs: Date.now(),
    };
}
