test(confidence-engine): forward deep provider schemas
This commit is contained in:
@@ -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)}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user