🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(feature-previews): allow enabling previews on self-hosted deploys (#15301)
Nimar05e3b42e8974
diff --git a/web/src/components/layouts/app-layout/variants/AuthenticatedLayout.tsx b/web/src/components/layouts/app-layout/variants/AuthenticatedLayout.tsxindex b1fe59f2ba..4f083d6a5d 100644--- a/web/src/components/layouts/app-layout/variants/AuthenticatedLayout.tsx+++ b/web/src/components/layouts/app-layout/variants/AuthenticatedLayout.tsx@@ -114,7 +114,7 @@ export function AuthenticatedLayout({}),);- const hasFeaturePreviews = isLangfuseCloud;+ const hasFeaturePreviews = isLangfuseCloud || user.v4BetaEnabled === true;// User navigation items for sidebar dropdownconst userNavProps = {diff --git a/web/src/server/api/routers/userAccount.ts b/web/src/server/api/routers/userAccount.tsindex 192ee4253f..9963920bfb 100644--- a/web/src/server/api/routers/userAccount.ts+++ b/web/src/server/api/routers/userAccount.ts@@ -110,11 +110,15 @@ export const userAccountRouter = createTRPCRouter({.mutation(async ({ input, ctx }) => {const userId = ctx.session.user.id;- if (input.enabled && !env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION) {+ const canEnableFeaturePreviews =+ Boolean(env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION) ||+ ctx.session.user.v4BetaEnabled === true;++ if (input.enabled && !canEnableFeaturePreviews) {throw new TRPCError({code: "PRECONDITION_FAILED",message:- "Feature previews are not available in self-hosted deployments.",+ "Feature previews require Fast (Preview) on self-hosted deployments.",});}