🪢 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
chore(events-table): show v4 beta toggle only on cloud (#12001)
Nimar930ca3b86155
diff --git a/.env.dev-azure.example b/.env.dev-azure.exampleindex fae350ff23..1f9875fccb 100644--- a/.env.dev-azure.example+++ b/.env.dev-azure.example@@ -25,7 +25,7 @@ NEXTAUTH_SECRET="secret"NEXT_PUBLIC_LANGFUSE_CLOUD_REGION="DEV"# Langfuse experimental features-LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES="true"+LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES="false"# Salt for API key hashingSALT="salt"diff --git a/.env.dev-redis-cluster.example b/.env.dev-redis-cluster.exampleindex 920a5e434a..82b738b4fd 100644--- a/.env.dev-redis-cluster.example+++ b/.env.dev-redis-cluster.example@@ -25,7 +25,7 @@ NEXTAUTH_SECRET="secret"NEXT_PUBLIC_LANGFUSE_CLOUD_REGION="DEV"# Langfuse experimental features-LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES="true"+LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES="false"# Salt for API key hashingSALT="salt"diff --git a/.env.dev.example b/.env.dev.exampleindex 674837607e..3544f77fbc 100644--- a/.env.dev.example+++ b/.env.dev.example@@ -64,7 +64,7 @@ NEXTAUTH_SECRET="secret"NEXT_PUBLIC_LANGFUSE_CLOUD_REGION="DEV"# Langfuse experimental features-LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES="true"+LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES="false"# Salt for API key hashingSALT="salt"diff --git a/.env.prod.example b/.env.prod.exampleindex c539c762cc..925b4cda5b 100644--- a/.env.prod.example+++ b/.env.prod.example@@ -53,7 +53,7 @@ OTEL_SERVICE_NAME="langfuse"# LANGFUSE_LOG_FORMAT=text# Enable experimental features, optional-# LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=true+# LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES=false# Auth, optional configuration# AUTH_DOMAINS_WITH_SSO_ENFORCEMENT=domain1.com,domain2.com@@ -144,7 +144,7 @@ OTEL_SERVICE_NAME="langfuse"# Transactional email, optional# Defines the email address to use as the from address.# EMAIL_FROM_ADDRESS=-# Defines the connection url for smtp server.+# Defines the connection url for smtp server.# SMTP_CONNECTION_URL=# S3 Batch Exports@@ -217,7 +217,7 @@ LANGFUSE_ENABLE_BLOB_STORAGE_FILE_LOG=true# Ingestion configuration# LANGFUSE_INGESTION_QUEUE_DELAY_MS=# LANGFUSE_INGESTION_CLICKHOUSE_WRITE_BATCH_SIZE=-# LANGFUSE_INGESTION_CLICKHOUSE_WRITE_INTERVAL_MS=+# LANGFUSE_INGESTION_CLICKHOUSE_WRITE_INTERVAL_MS=# LANGFUSE_INGESTION_CLICKHOUSE_MAX_ATTEMPTS=### START Enterprise Edition Configurationdiff --git a/docker-compose.yml b/docker-compose.ymlindex 492e0daf65..587a2659a3 100644--- a/docker-compose.yml+++ b/docker-compose.yml@@ -24,7 +24,7 @@ services:SALT: ${SALT:-mysalt} # CHANGEMEENCRYPTION_KEY: ${ENCRYPTION_KEY:-0000000000000000000000000000000000000000000000000000000000000000} # CHANGEME: generate via `openssl rand -hex 32`TELEMETRY_ENABLED: ${TELEMETRY_ENABLED:-true}- LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES: ${LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES:-true}+ LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES: ${LANGFUSE_ENABLE_EXPERIMENTAL_FEATURES:-false}CLICKHOUSE_MIGRATION_URL: ${CLICKHOUSE_MIGRATION_URL:-clickhouse://clickhouse:9000}CLICKHOUSE_URL: ${CLICKHOUSE_URL:-http://clickhouse:8123}CLICKHOUSE_USER: ${CLICKHOUSE_USER:-clickhouse}diff --git a/web/src/components/layouts/app-layout/hooks/useFilteredNavigation.ts b/web/src/components/layouts/app-layout/hooks/useFilteredNavigation.tsindex ab0f6112e3..3f6b83d0a0 100644--- a/web/src/components/layouts/app-layout/hooks/useFilteredNavigation.ts+++ b/web/src/components/layouts/app-layout/hooks/useFilteredNavigation.ts@@ -103,6 +103,7 @@ export function useFilteredNavigation(),entitlements,uiCustomization,+ isLangfuseCloud,currentPath: router.asPath,}),[diff --git a/web/src/components/layouts/app-layout/utils/navigationFilters.ts b/web/src/components/layouts/app-layout/utils/navigationFilters.tsindex 8c2982990d..1a6d807cfc 100644--- a/web/src/components/layouts/app-layout/utils/navigationFilters.ts+++ b/web/src/components/layouts/app-layout/utils/navigationFilters.ts@@ -68,7 +68,7 @@ export const filters = {* - Experimental features enabled* - User is cloud admin* - User has specific feature flag- * - For v4Beta: also show when user email ends with @langfuse.com+ * - For v4Beta: also show when user email ends with @langfuse.com, feature flag is set and we are in a cloud environment*/featureFlags: (route: Route, ctx: NavigationFilterContext): Route | null => {if (route.featureFlag === undefined) return route;@@ -77,13 +77,21 @@ export const filters = {ctx.enableExperimentalFeatures ||ctx.cloudAdmin ||ctx.session?.user?.featureFlags?.[route.featureFlag] === true;-- // For v4Beta: also show when user email ends with @langfuse.com- const isV4BetaLangfuseEmail =- route.featureFlag === "v4BetaToggleVisible" &&+ // TODO: remove when v4 beta is GA+ // v4 beta toggle special cases+ const isV4BetaRoute = route.featureFlag === "v4BetaToggleVisible";+ const isLangfuseTeam =+ ctx.isLangfuseCloud &&ctx.session?.user?.email?.endsWith("@langfuse.com") === true;+ const hasCloudFlag =+ ctx.isLangfuseCloud &&+ ctx.session?.user?.featureFlags?.[route.featureFlag] === true;+ // ungated: opted-in users must see toggle to turn it off regardless of env+ const hasOptedIn = ctx.session?.user?.v4BetaEnabled === true;+ const isV4BetaVisible =+ isV4BetaRoute && (isLangfuseTeam || hasOptedIn || hasCloudFlag);- return hasFlag || isV4BetaLangfuseEmail ? route : null;+ return hasFlag || isV4BetaVisible ? route : null;},/**diff --git a/web/src/components/layouts/app-layout/utils/navigationFilters.types.ts b/web/src/components/layouts/app-layout/utils/navigationFilters.types.tsindex 1746602dee..87d778b024 100644--- a/web/src/components/layouts/app-layout/utils/navigationFilters.types.ts+++ b/web/src/components/layouts/app-layout/utils/navigationFilters.types.ts@@ -25,6 +25,8 @@ export type NavigationFilterContext = {entitlements: Entitlement[];/** UI customization settings (enterprise feature) */uiCustomization: { visibleModules: string[] } | null;+ /** Whether the deployment is a Langfuse Cloud environment */+ isLangfuseCloud: boolean;/** Current router path for active state detection */currentPath: string;};