experiment(confidence-engine): route UI journey provider centrally

This commit is contained in:
2026-09-07 09:35:53 +01:00
parent 642a969b18
commit bb3082d633
15 changed files with 158 additions and 17 deletions
+2 -2
View File
@@ -6,7 +6,7 @@
* Thin route pattern — no overview business logic here.
*/
import { getProvider } from "@/lib/llm/provider.js";
import { getProvider, getProviderModelName } from "@/lib/llm/provider.js";
import { synthesizeInvestigationOverview } from "@/lib/graph/investigation-overview-synthesis.js";
export async function POST(request) {
@@ -33,7 +33,7 @@ export async function POST(request) {
{ situationGraph, findings, plausibleInterpretations },
{
provider: getProvider(),
modelName: process.env.OLLAMA_MODEL ?? null,
modelName: getProviderModelName(),
}
);
+2 -2
View File
@@ -9,7 +9,7 @@
* No synthesis business logic belongs in this file.
*/
import { getProvider } from "@/lib/llm/provider.js";
import { getProvider, getProviderModelName } from "@/lib/llm/provider.js";
import { synthesizeCurrentUnderstanding } from "@/lib/graph/current-understanding-synthesis.js";
export async function POST(request) {
@@ -38,7 +38,7 @@ export async function POST(request) {
{ situationGraph, findings },
{
provider: getProvider(),
modelName: process.env.OLLAMA_MODEL ?? null,
modelName: getProviderModelName(),
}
);
@@ -1,4 +1,4 @@
import { getProvider } from "@/lib/llm/provider";
import { getProvider, getProviderModelName } from "@/lib/llm/provider";
import {
buildFocusedDeconstructPrompt,
focusedDeconstructJsonSchema,
@@ -58,7 +58,7 @@ export async function POST(request) {
const startedAt = Date.now();
const wrapper = await provider.generateReconstruction(
prompt,
process.env.OLLAMA_MODEL,
getProviderModelName(),
focusedDeconstructJsonSchema,
);
const elapsedMs = Date.now() - startedAt;