feat(inference): capture reasoning_content on responses (WIP, provider side)
Adds a nullable `reasoning` field to InferenceResponse and maps the llama.cpp / OpenAI-compat `reasoning_content` field into it, so local models that emit their chain-of-thought have it captured. Provider/model side only — the emit-site event field (reasoningArtifactId) + CAS storage in the orchestrator are still pending (tracked in Vikunja Correx #4).
This commit is contained in:
+1
@@ -24,6 +24,7 @@ data class ChatCompletionRequest(
|
||||
data class LlamaCppChatMessage(
|
||||
val role: String,
|
||||
val content: String?,
|
||||
@SerialName("reasoning_content") val reasoningContent: String? = null,
|
||||
@SerialName("tool_calls") val toolCalls: List<ToolCallRequest> = emptyList(),
|
||||
@SerialName("tool_call_id") val toolCallId: String? = null,
|
||||
)
|
||||
|
||||
+1
@@ -215,6 +215,7 @@ class LlamaCppInferenceProvider(
|
||||
),
|
||||
latencyMs = System.currentTimeMillis() - startTime,
|
||||
toolCalls = toolCalls,
|
||||
reasoning = message.reasoningContent?.takeIf { it.isNotBlank() },
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -28,6 +28,7 @@ data class OpenAiChatCompletionRequest(
|
||||
data class OpenAiChatMessage(
|
||||
val role: String,
|
||||
val content: String? = null,
|
||||
@SerialName("reasoning_content") val reasoningContent: String? = null,
|
||||
@SerialName("tool_calls") val toolCalls: List<ToolCallRequest> = emptyList(),
|
||||
@SerialName("tool_call_id") val toolCallId: String? = null,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user