experiment(confidence-engine): expose reconstruction provider seam
This commit is contained in:
@@ -356,6 +356,24 @@ describe("lib/graph/orchestrator startCase", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("forwards an injected reconstruction provider to analyseScenario", async () => {
|
||||
mockAnalyseScenario.mockResolvedValue(makeAnalysisResult());
|
||||
const reconstructionProvider = { generateReconstruction: vi.fn() };
|
||||
const { startCase } = await import("@/lib/graph/orchestrator.js");
|
||||
|
||||
const result = await startCase(
|
||||
{ scenario: "Scenario text" },
|
||||
{ reconstructionProvider, reconstructionModelName: "experiment-model" },
|
||||
);
|
||||
|
||||
expect(result.success).toBe(true);
|
||||
expect(mockAnalyseScenario).toHaveBeenCalledWith("Scenario text", {
|
||||
promptVersion: undefined,
|
||||
reconstructionProvider,
|
||||
reconstructionModelName: "experiment-model",
|
||||
});
|
||||
});
|
||||
|
||||
it("rejects invalid request input without throwing", async () => {
|
||||
const { startCase } = await import("@/lib/graph/orchestrator.js");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user