fix(confidence-engine): supply focused deconstruction schema

This commit is contained in:
2026-09-06 16:21:26 +01:00
parent 188dd04ab9
commit a93b6798cc
6 changed files with 110 additions and 17 deletions
@@ -1,5 +1,9 @@
import { getProvider } from "@/lib/llm/provider";
import { buildFocusedDeconstructPrompt, validateFocusedDeconstructSchema } from "@/lib/graph/focused-investigation";
import {
buildFocusedDeconstructPrompt,
focusedDeconstructJsonSchema,
validateFocusedDeconstructSchema,
} from "@/lib/graph/focused-investigation";
export async function POST(request) {
try {
@@ -52,7 +56,11 @@ export async function POST(request) {
const provider = getProvider();
const startedAt = Date.now();
const wrapper = await provider.generateReconstruction(prompt, process.env.OLLAMA_MODEL);
const wrapper = await provider.generateReconstruction(
prompt,
process.env.OLLAMA_MODEL,
focusedDeconstructJsonSchema,
);
const elapsedMs = Date.now() - startedAt;
// Unwrap the semantic deconstruction from the provider envelope.