// Generated by alef. Do not edit by hand.
@file:Suppress(
    "ktlint:standard:trailing-comma-on-call-site",
    "ktlint:standard:trailing-comma-on-declaration-site",
    "ktlint:standard:spacing-between-declarations-with-comments",
    "ktlint:standard:spacing-between-declarations-with-annotations",
    "ktlint:standard:when-entry-bracing",
    "ktlint:standard:blank-line-between-when-conditions",
    "ktlint:standard:blank-line-before-declaration",
    "ktlint:standard:chain-method-continuation",
    "ktlint:standard:annotation",
    "ktlint:standard:max-line-length",
    "ktlint:standard:no-semi",
    "ktlint:standard:statement-wrapping",
    "MaxLineLength",
    "TooManyFunctions",
    "FunctionParameterNaming",
    "LongParameterList",
    "CyclomaticComplexMethod",
    "LongMethod",
)

package dev.kreuzberg

/**
 * Token usage and cost data for a single LLM call made during extraction.
 *
 * Populated when VLM OCR, structured extraction, or LLM-based embeddings
 * are used. Multiple entries may be present when multiple LLM calls occur
 * within one extraction (e.g. VLM OCR + structured extraction).
 */
data class LlmUsage(
    /** The LLM model identifier (e.g. "openai/gpt-4o", "anthropic/claude-sonnet-4-20250514"). */
    val model: String = "",
    /**
     * The pipeline stage that triggered this LLM call
     * (e.g. "vlm_ocr", "structured_extraction", "embeddings").
     */
    val source: String = "",
    /** Number of input/prompt tokens consumed. */
    val inputTokens: Long? = null,
    /** Number of output/completion tokens generated. */
    val outputTokens: Long? = null,
    /** Total tokens (input + output). */
    val totalTokens: Long? = null,
    /** Estimated cost in USD based on the provider's published pricing. */
    val estimatedCost: Double? = null,
    /** Why the model stopped generating (e.g. "stop", "length", "content_filter"). */
    val finishReason: String? = null,
)
