Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: allow return from aggregatingmergetrees without experiments (#8215)

Steffen Schmitz9c203e8b8a06
diff --git a/packages/shared/src/server/clickhouse/measureAndReturn.ts b/packages/shared/src/server/clickhouse/measureAndReturn.ts
index 6452be0b60..3c0eb661ae 100644
--- a/packages/shared/src/server/clickhouse/measureAndReturn.ts
+++ b/packages/shared/src/server/clickhouse/measureAndReturn.ts
@@ -39,7 +39,9 @@ export const measureAndReturn = async <T, Y>(args: {
"true"
) {
currentSpan.setAttribute(`langfuse.experiment.amts.run`, "disabled");
- return existingExecution(input);
+ return env.LANGFUSE_EXPERIMENT_RETURN_NEW_RESULT === "true"
+ ? newExecution(input)
+ : existingExecution(input);
}
// If not whitelisted, apply sampling logic