package com.correx.core.inference

import com.correx.core.events.types.InferenceRequestId
import kotlinx.serialization.Serializable

@Serializable
data class InferenceResponse(
    val requestId: InferenceRequestId,
    val text: String,
    val finishReason: FinishReason,
    val tokensUsed: TokenUsage,
    val latencyMs: Long,
    val toolCalls: List<ToolCallRequest> = emptyList(),
    // The model's chain-of-thought, when the provider exposes it separately (llama.cpp / OpenAI-compat
    // `reasoning_content`). Captured for observability/audit — many local models emit their whole plan
    // here and leave `text` empty, so dropping it hid why a stage behaved as it did (2026-07-05).
    val reasoning: String? = null,
)
