test(confidence-engine): forward deep provider schemas

This commit is contained in:
2026-10-07 07:25:52 +01:00
parent 0b84f8ad28
commit 44db12d9c0
2 changed files with 57 additions and 7 deletions
@@ -194,10 +194,10 @@ async function runLiveExperiment({ graph, previousQuestion, answer, findings = [
let providerGenerateCalls = 0;
const timedProvider = {
async generateReconstruction(prompt, modelName) {
async generateReconstruction(prompt, modelName, outputSchema) {
providerGenerateCalls++;
const startedAt = Date.now();
const response = await provider.generateReconstruction(prompt, modelName);
const response = await provider.generateReconstruction(prompt, modelName, outputSchema);
modelElapsedMs = Date.now() - startedAt;
return response;
},
@@ -299,10 +299,10 @@ async function composeDeepInvestigationCheckpoint({ situationGraph, previousQues
let providerGenerateCalls = 0;
const timedProvider = {
async generateReconstruction(prompt, modelName) {
async generateReconstruction(prompt, modelName, outputSchema) {
providerGenerateCalls++;
const startedAt = Date.now();
const response = await provider.generateReconstruction(prompt, modelName);
const response = await provider.generateReconstruction(prompt, modelName, outputSchema);
modelElapsedMs = Date.now() - startedAt;
return response;
},
@@ -332,7 +332,7 @@ async function composeDeepInvestigationCheckpoint({ situationGraph, previousQues
// Call production-focused deconstruct — exactly one provider generation
const focused = await focusedDeconstruct({
provider,
provider: timedProvider,
modelName: model,
targetNodeId,
targetLabel,
@@ -342,8 +342,6 @@ async function composeDeepInvestigationCheckpoint({ situationGraph, previousQues
answer,
});
providerGenerateCalls++; // focusedDeconstruct now uses the same provider (1 call)
if (!focused.success) {
throw new Error(`focusedDeconstruct failed for episode ${contribSeq}: ${JSON.stringify(focused.errors)}`);
}