Skip to content

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

chore: move core features to OSS (#7091)

Max Deichmannf5cf8693e980
diff --git a/packages/shared/src/features/entitlements/plans.ts b/packages/shared/src/features/entitlements/plans.ts
index 6dbd3d70e2..6d2bc2f34c 100644
--- a/packages/shared/src/features/entitlements/plans.ts
+++ b/packages/shared/src/features/entitlements/plans.ts
@@ -14,7 +14,6 @@ export const planLabels = {
"cloud:pro": "Pro",
"cloud:team": "Team",
"cloud:enterprise": "Enterprise",
- "self-hosted:pro": "Pro (self-hosted)",
"self-hosted:enterprise": "Enterprise (self-hosted)",
} as const;
diff --git a/web/src/app/api/chatCompletion/route.ts b/web/src/app/api/chatCompletion/route.ts
index bd71039d9f..5f6048243e 100644
--- a/web/src/app/api/chatCompletion/route.ts
+++ b/web/src/app/api/chatCompletion/route.ts
@@ -1,4 +1,4 @@
-import chatCompletionHandler from "@/src/ee/features/playground/server/chatCompletionHandler";
+import chatCompletionHandler from "@/src/features/playground/server/chatCompletionHandler";
export const dynamic = "force-dynamic";
export const maxDuration = 120;
diff --git a/web/src/components/VersionLabel.tsx b/web/src/components/VersionLabel.tsx
index c6b388d975..906853df65 100644
--- a/web/src/components/VersionLabel.tsx
+++ b/web/src/components/VersionLabel.tsx
@@ -52,8 +52,9 @@ export const VersionLabel = ({ className }: { className?: string }) => {
const selfHostedPlanLabel = !isLangfuseCloud
? plan && isSelfHostedPlan(plan)
? // self-host plan
+ // TODO: clean up to use planLabels in packages/shared/src/features/entitlements/plans.ts
{
- short: plan === "self-hosted:pro" ? "Pro" : "EE",
+ short: "EE",
long: planLabels[plan],
}
: // no plan, oss
diff --git a/web/src/components/deleteButton.tsx b/web/src/components/deleteButton.tsx
index 8dcf6eb7fd..9ade623c23 100644
--- a/web/src/components/deleteButton.tsx
+++ b/web/src/components/deleteButton.tsx
@@ -323,10 +323,6 @@ export function DeleteEvalConfigButton(props: DeleteButtonProps) {
}
};
- const hasModelBasedEvaluationEntitlement = useHasEntitlement(
- "model-based-evaluations",
- );
-
return (
<DeleteButton
{...props}
@@ -345,7 +341,6 @@ export function DeleteEvalConfigButton(props: DeleteButtonProps) {
entityToDeleteName="running evaluator"
executeDeleteMutation={executeDeleteMutation}
isDeleteMutationLoading={evaluatorMutation.isLoading}
- enabled={hasModelBasedEvaluationEntitlement}
/>
);
}
@@ -382,9 +377,7 @@ export function DeleteEvaluationModelButton(
}
onSuccess();
};
- const hasModelBasedEvaluationEntitlement = useHasEntitlement(
- "model-based-evaluations",
- );
+
return (
<DeleteButton
{...props}
@@ -406,7 +399,6 @@ export function DeleteEvaluationModelButton(
deleteConfirmation="delete"
executeDeleteMutation={executeDeleteMutation}
isDeleteMutationLoading={isLoading}
- enabled={hasModelBasedEvaluationEntitlement}
/>
);
}
diff --git a/web/src/components/layouts/routes.tsx b/web/src/components/layouts/routes.tsx
index e9b92b6f16..6eda6d3fca 100644
--- a/web/src/components/layouts/routes.tsx
+++ b/web/src/components/layouts/routes.tsx
@@ -73,7 +73,6 @@ export const ROUTES: Route[] = [
title: "Dashboards",
pathname: `/project/[projectId]/dashboards`,
icon: LayoutDashboard,
- entitlements: ["custom-dashboards"],
productModule: "dashboards",
},
{
@@ -105,19 +104,16 @@ export const ROUTES: Route[] = [
icon: Lightbulb,
pathname: `/project/[projectId]/annotation-queues`,
productModule: "evaluation",
- entitlements: ["annotation-queues", "model-based-evaluations"],
projectRbacScopes: ["annotationQueues:read", "evalJob:read"],
items: [
{
title: "Human Annotation",
pathname: `/project/[projectId]/annotation-queues`,
projectRbacScopes: ["annotationQueues:read"],
- entitlements: ["annotation-queues"],
},
{
title: "LLM-as-a-Judge",
pathname: `/project/[projectId]/evals`,
- entitlements: ["model-based-evaluations"],
projectRbacScopes: ["evalJob:read"],
},
],
@@ -140,7 +136,6 @@ export const ROUTES: Route[] = [
pathname: "/project/[projectId]/playground",
icon: TerminalIcon,
productModule: "playground",
- entitlements: ["playground"],
},
{
title: "Datasets",
diff --git a/web/src/components/onboarding/AnnotationQueuesOnboarding.tsx b/web/src/components/onboarding/AnnotationQueuesOnboarding.tsx
index 4c206417ee..d3cf3b85b6 100644
--- a/web/src/components/onboarding/AnnotationQueuesOnboarding.tsx
+++ b/web/src/components/onboarding/AnnotationQueuesOnboarding.tsx
@@ -4,7 +4,7 @@ import {
type ValueProposition,
} from "@/src/components/ui/splash-screen";
import { ClipboardCheck, Users, BarChart4, GitMerge } from "lucide-react";
-import { CreateOrEditAnnotationQueueButton } from "@/src/ee/features/annotation-queues/components/CreateOrEditAnnotationQueueButton";
+import { CreateOrEditAnnotationQueueButton } from "@/src/features/annotation-queues/components/CreateOrEditAnnotationQueueButton";
export function AnnotationQueuesOnboarding({
projectId,
diff --git a/web/src/components/table/peek/hooks/useEvalTemplatesPeekNavigation.ts b/web/src/components/table/peek/hooks/useEvalTemplatesPeekNavigation.ts
index 30c5773364..780d496056 100644
--- a/web/src/components/table/peek/hooks/useEvalTemplatesPeekNavigation.ts
+++ b/web/src/components/table/peek/hooks/useEvalTemplatesPeekNavigation.ts
@@ -1,4 +1,4 @@
-import { type EvalsTemplateRow } from "@/src/ee/features/evals/components/eval-templates-table";
+import { type EvalsTemplateRow } from "@/src/features/evals/components/eval-templates-table";
import { type ListEntry } from "@/src/features/navigate-detail-pages/context";
import { useRouter } from "next/router";
diff --git a/web/src/components/table/peek/peek-evaluator-config-detail.tsx b/web/src/components/table/peek/peek-evaluator-config-detail.tsx
index f5e6439ba9..9d86919252 100644
--- a/web/src/components/table/peek/peek-evaluator-config-detail.tsx
+++ b/web/src/components/table/peek/peek-evaluator-config-detail.tsx
@@ -1,9 +1,9 @@
import { usePeekState } from "@/src/components/table/peek/hooks/usePeekState";
-import { type EvaluatorDataRow } from "@/src/ee/features/evals/components/evaluator-table";
+import { type EvaluatorDataRow } from "@/src/features/evals/components/evaluator-table";
import { Skeleton } from "@/src/components/ui/skeleton";
import TableLink from "@/src/components/table/table-link";
import { CardDescription } from "@/src/components/ui/card";
-import { EvaluatorForm } from "@/src/ee/features/evals/components/evaluator-form";
+import { EvaluatorForm } from "@/src/features/evals/components/evaluator-form";
import { usePeekEvalConfigData } from "@/src/components/table/peek/hooks/usePeekEvalConfigData";
import {
Tooltip,
@@ -13,7 +13,7 @@ import {
import { LangfuseIcon } from "@/src/components/LangfuseLogo";
import { UserCircle2Icon } from "lucide-react";
import { StatusBadge } from "@/src/components/layouts/status-badge";
-import { DeactivateEvalConfig } from "@/src/ee/features/evals/components/deactivate-config";
+import { DeactivateEvalConfig } from "@/src/features/evals/components/deactivate-config";
export const PeekViewEvaluatorConfigDetail = ({
projectId,
diff --git a/web/src/components/table/peek/peek-evaluator-template-detail.tsx b/web/src/components/table/peek/peek-evaluator-template-detail.tsx
index f06033c774..4c7c5173be 100644
--- a/web/src/components/table/peek/peek-evaluator-template-detail.tsx
+++ b/web/src/components/table/peek/peek-evaluator-template-detail.tsx
@@ -1,9 +1,9 @@
import { usePeekState } from "@/src/components/table/peek/hooks/usePeekState";
import { Skeleton } from "@/src/components/ui/skeleton";
import { usePeekEvalTemplateData } from "@/src/components/table/peek/hooks/usePeekEvalTemplateData";
-import { EvalTemplateForm } from "@/src/ee/features/evals/components/template-form";
-import { MaintainerTooltip } from "@/src/ee/features/evals/components/maintainer-tooltip";
-import { getMaintainer } from "@/src/ee/features/evals/utils/typeHelpers";
+import { EvalTemplateForm } from "@/src/features/evals/components/template-form";
+import { MaintainerTooltip } from "@/src/features/evals/components/maintainer-tooltip";
+import { getMaintainer } from "@/src/features/evals/utils/typeHelpers";
export const PeekViewEvaluatorTemplateDetail = ({
projectId,
diff --git a/web/src/components/table/use-cases/traces.tsx b/web/src/components/table/use-cases/traces.tsx
index 6e9ad14e3f..27b9679f44 100644
--- a/web/src/components/table/use-cases/traces.tsx
+++ b/web/src/components/table/use-cases/traces.tsx
@@ -427,7 +427,6 @@ export default function TracesTable({
execute: handleAddToAnnotationQueue,
accessCheck: {
scope: "annotationQueues:CUD",
- entitlement: "annotation-queues",
},
},
];
diff --git a/web/src/components/trace/ObservationPreview.tsx b/web/src/components/trace/ObservationPreview.tsx
index 6bb48b9c5e..3592ee999d 100644
--- a/web/src/components/trace/ObservationPreview.tsx
+++ b/web/src/components/trace/ObservationPreview.tsx
@@ -9,14 +9,13 @@ import Link from "next/link";
import { usdFormatter } from "@/src/utils/numbers";
import { withDefault, StringParam, useQueryParam } from "use-query-params";
import ScoresTable from "@/src/components/table/use-cases/scores";
-import { JumpToPlaygroundButton } from "@/src/ee/features/playground/page/components/JumpToPlaygroundButton";
+import { JumpToPlaygroundButton } from "@/src/features/playground/page/components/JumpToPlaygroundButton";
import { AnnotateDrawer } from "@/src/features/scores/components/AnnotateDrawer";
import useLocalStorage from "@/src/components/useLocalStorage";
import { CommentDrawerButton } from "@/src/features/comments/CommentDrawerButton";
import { cn } from "@/src/utils/tailwind";
import { NewDatasetItemFromExistingObject } from "@/src/features/datasets/components/NewDatasetItemFromExistingObject";
-import { CreateNewAnnotationQueueItem } from "@/src/ee/features/annotation-queues/components/CreateNewAnnotationQueueItem";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
+import { CreateNewAnnotationQueueItem } from "@/src/features/annotation-queues/components/CreateNewAnnotationQueueItem";
import { calculateDisplayTotalCost } from "@/src/components/trace/lib/helpers";
import { Fragment, useMemo, useState } from "react";
import { useIsAuthenticatedAndProjectMember } from "@/src/features/auth/hooks";
@@ -65,7 +64,7 @@ export const ObservationPreview = ({
const [emptySelectedConfigIds, setEmptySelectedConfigIds] = useLocalStorage<
string[]
>("emptySelectedConfigIds", []);
- const hasEntitlement = useHasEntitlement("annotation-queues");
+
const isAuthenticatedAndProjectMember =
useIsAuthenticatedAndProjectMember(projectId);
const router = useRouter();
@@ -163,16 +162,15 @@ export const ObservationPreview = ({
scores={scores}
emptySelectedConfigIds={emptySelectedConfigIds}
setEmptySelectedConfigIds={setEmptySelectedConfigIds}
- hasGroupedButton={hasEntitlement}
+ hasGroupedButton={true}
environment={preloadedObservation.environment}
/>
- {hasEntitlement && (
- <CreateNewAnnotationQueueItem
- projectId={projectId}
- objectId={preloadedObservation.id}
- objectType={AnnotationQueueObjectType.OBSERVATION}
- />
- )}
+
+ <CreateNewAnnotationQueueItem
+ projectId={projectId}
+ objectId={preloadedObservation.id}
+ objectType={AnnotationQueueObjectType.OBSERVATION}
+ />
</div>
{observationWithInputAndOutput.data?.type === "GENERATION" && (
<JumpToPlaygroundButton
diff --git a/web/src/components/trace/TracePreview.tsx b/web/src/components/trace/TracePreview.tsx
index 7bff89e4b9..30f4636d27 100644
--- a/web/src/components/trace/TracePreview.tsx
+++ b/web/src/components/trace/TracePreview.tsx
@@ -16,8 +16,7 @@ import useLocalStorage from "@/src/components/useLocalStorage";
import { CommentDrawerButton } from "@/src/features/comments/CommentDrawerButton";
import { api } from "@/src/utils/api";
import { NewDatasetItemFromExistingObject } from "@/src/features/datasets/components/NewDatasetItemFromExistingObject";
-import { CreateNewAnnotationQueueItem } from "@/src/ee/features/annotation-queues/components/CreateNewAnnotationQueueItem";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
+import { CreateNewAnnotationQueueItem } from "@/src/features/annotation-queues/components/CreateNewAnnotationQueueItem";
import { useMemo, useState } from "react";
import { usdFormatter } from "@/src/utils/numbers";
import { calculateDisplayTotalCost } from "@/src/components/trace/lib/helpers";
@@ -65,7 +64,6 @@ export const TracePreview = ({
const [emptySelectedConfigIds, setEmptySelectedConfigIds] = useLocalStorage<
string[]
>("emptySelectedConfigIds", []);
- const hasEntitlement = useHasEntitlement("annotation-queues");
const isAuthenticatedAndProjectMember = useIsAuthenticatedAndProjectMember(
trace.projectId,
);
@@ -139,16 +137,14 @@ export const TracePreview = ({
scores={scores}
emptySelectedConfigIds={emptySelectedConfigIds}
setEmptySelectedConfigIds={setEmptySelectedConfigIds}
- hasGroupedButton={hasEntitlement}
+ hasGroupedButton={true}
environment={trace.environment}
/>
- {hasEntitlement && (
- <CreateNewAnnotationQueueItem
- projectId={trace.projectId}
- objectId={trace.id}
- objectType={AnnotationQueueObjectType.TRACE}
- />
- )}
+ <CreateNewAnnotationQueueItem
+ projectId={trace.projectId}
+ objectId={trace.id}
+ objectType={AnnotationQueueObjectType.TRACE}
+ />
</div>
<CommentDrawerButton
projectId={trace.projectId}
diff --git a/web/src/ee/features/admin-api/public/organizations/memberships.ts b/web/src/features/admin-api/memberships.ts
similarity index 100%
rename from web/src/ee/features/admin-api/public/organizations/memberships.ts
rename to web/src/features/admin-api/memberships.ts
diff --git a/web/src/ee/features/admin-api/organizations/apiKeys/apiKeyById.ts b/web/src/features/admin-api/organizations/apiKeys/apiKeyById.ts
similarity index 100%
rename from web/src/ee/features/admin-api/organizations/apiKeys/apiKeyById.ts
rename to web/src/features/admin-api/organizations/apiKeys/apiKeyById.ts
diff --git a/web/src/ee/features/admin-api/organizations/apiKeys/index.ts b/web/src/features/admin-api/organizations/apiKeys/index.ts
similarity index 100%
rename from web/src/ee/features/admin-api/organizations/apiKeys/index.ts
rename to web/src/features/admin-api/organizations/apiKeys/index.ts
diff --git a/web/src/ee/features/admin-api/organizations/index.ts b/web/src/features/admin-api/organizations/index.ts
similarity index 100%
rename from web/src/ee/features/admin-api/organizations/index.ts
rename to web/src/features/admin-api/organizations/index.ts
diff --git a/web/src/ee/features/admin-api/organizations/organizationById.ts b/web/src/features/admin-api/organizations/organizationById.ts
similarity index 100%
rename from web/src/ee/features/admin-api/organizations/organizationById.ts
rename to web/src/features/admin-api/organizations/organizationById.ts
diff --git a/web/src/ee/features/admin-api/public/organizations/projects.ts b/web/src/features/admin-api/projects.ts
similarity index 100%
rename from web/src/ee/features/admin-api/public/organizations/projects.ts
rename to web/src/features/admin-api/projects.ts
diff --git a/web/src/ee/features/admin-api/public/projects/createProject.ts b/web/src/features/admin-api/projects/createProject.ts
similarity index 100%
rename from web/src/ee/features/admin-api/public/projects/createProject.ts
rename to web/src/features/admin-api/projects/createProject.ts
diff --git a/web/src/ee/features/admin-api/public/projects/projectById/apiKeys/apiKeyById.ts b/web/src/features/admin-api/projects/projectById/apiKeys/apiKeyById.ts
similarity index 100%
rename from web/src/ee/features/admin-api/public/projects/projectById/apiKeys/apiKeyById.ts
rename to web/src/features/admin-api/projects/projectById/apiKeys/apiKeyById.ts
diff --git a/web/src/ee/features/admin-api/public/projects/projectById/apiKeys/index.ts b/web/src/features/admin-api/projects/projectById/apiKeys/index.ts
similarity index 100%
rename from web/src/ee/features/admin-api/public/projects/projectById/apiKeys/index.ts
rename to web/src/features/admin-api/projects/projectById/apiKeys/index.ts
diff --git a/web/src/ee/features/admin-api/public/projects/projectById/index.ts b/web/src/features/admin-api/projects/projectById/index.ts
similarity index 100%
rename from web/src/ee/features/admin-api/public/projects/projectById/index.ts
rename to web/src/features/admin-api/projects/projectById/index.ts
diff --git a/web/src/ee/features/admin-api/public/projects/projectById/memberships/index.ts b/web/src/features/admin-api/projects/projectById/memberships/index.ts
similarity index 100%
rename from web/src/ee/features/admin-api/public/projects/projectById/memberships/index.ts
rename to web/src/features/admin-api/projects/projectById/memberships/index.ts
diff --git a/web/src/ee/features/annotation-queues/components/AnnotationQueueItemPage.tsx b/web/src/features/annotation-queues/components/AnnotationQueueItemPage.tsx
similarity index 100%
rename from web/src/ee/features/annotation-queues/components/AnnotationQueueItemPage.tsx
rename to web/src/features/annotation-queues/components/AnnotationQueueItemPage.tsx
diff --git a/web/src/ee/features/annotation-queues/components/AnnotationQueueItemsTable.tsx b/web/src/features/annotation-queues/components/AnnotationQueueItemsTable.tsx
similarity index 100%
rename from web/src/ee/features/annotation-queues/components/AnnotationQueueItemsTable.tsx
rename to web/src/features/annotation-queues/components/AnnotationQueueItemsTable.tsx
diff --git a/web/src/ee/features/annotation-queues/components/AnnotationQueuesItem.tsx b/web/src/features/annotation-queues/components/AnnotationQueuesItem.tsx
similarity index 88%
rename from web/src/ee/features/annotation-queues/components/AnnotationQueuesItem.tsx
rename to web/src/features/annotation-queues/components/AnnotationQueuesItem.tsx
index 8e3f1f6627..80147586db 100644
--- a/web/src/ee/features/annotation-queues/components/AnnotationQueuesItem.tsx
+++ b/web/src/features/annotation-queues/components/AnnotationQueuesItem.tsx
@@ -1,9 +1,8 @@
import { Tabs, TabsList, TabsTrigger } from "@/src/components/ui/tabs";
import useSessionStorage from "@/src/components/useSessionStorage";
import { SupportOrUpgradePage } from "@/src/ee/features/billing/components/SupportOrUpgradePage";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
-import { AnnotationQueueItemPage } from "@/src/ee/features/annotation-queues/components/AnnotationQueueItemPage";
+import { AnnotationQueueItemPage } from "@/src/features/annotation-queues/components/AnnotationQueueItemPage";
import { api } from "@/src/utils/api";
import { Goal, Network } from "lucide-react";
import Page from "@/src/components/layouts/page";
@@ -21,7 +20,6 @@ export const AnnotationQueuesItem = ({
projectId,
scope: "annotationQueues:read",
});
- const hasEntitlement = useHasEntitlement("annotation-queues");
const queue = api.annotationQueues.byId.useQuery(
{
@@ -43,7 +41,7 @@ export const AnnotationQueuesItem = ({
"hideTree",
);
- if (!hasAccess || !hasEntitlement) return <SupportOrUpgradePage />;
+ if (!hasAccess) return <SupportOrUpgradePage />;
return (
<Page
diff --git a/web/src/ee/features/annotation-queues/components/AnnotationQueuesTable.tsx b/web/src/features/annotation-queues/components/AnnotationQueuesTable.tsx
similarity index 96%
rename from web/src/ee/features/annotation-queues/components/AnnotationQueuesTable.tsx
rename to web/src/features/annotation-queues/components/AnnotationQueuesTable.tsx
index 5e9267a9b0..fd2f1aad47 100644
--- a/web/src/ee/features/annotation-queues/components/AnnotationQueuesTable.tsx
+++ b/web/src/features/annotation-queues/components/AnnotationQueuesTable.tsx
@@ -7,7 +7,7 @@ import useColumnVisibility from "@/src/features/column-visibility/hooks/useColum
import { DataTableToolbar } from "@/src/components/table/data-table-toolbar";
import { useRowHeightLocalStorage } from "@/src/components/table/data-table-row-height-switch";
import useColumnOrder from "@/src/features/column-visibility/hooks/useColumnOrder";
-import { CreateOrEditAnnotationQueueButton } from "@/src/ee/features/annotation-queues/components/CreateOrEditAnnotationQueueButton";
+import { CreateOrEditAnnotationQueueButton } from "@/src/features/annotation-queues/components/CreateOrEditAnnotationQueueButton";
import { type ScoreDataType } from "@langfuse/shared";
import { getScoreDataTypeIcon } from "@/src/features/scores/components/ScoreDetailColumnHelpers";
import {
@@ -22,7 +22,7 @@ import { cn } from "@/src/utils/tailwind";
import TableLink from "@/src/components/table/table-link";
import Link from "next/link";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
-import { DeleteAnnotationQueueButton } from "@/src/ee/features/annotation-queues/components/DeleteAnnotationQueueButton";
+import { DeleteAnnotationQueueButton } from "@/src/features/annotation-queues/components/DeleteAnnotationQueueButton";
type RowData = {
key: {
diff --git a/web/src/ee/features/annotation-queues/components/CreateNewAnnotationQueueItem.tsx b/web/src/features/annotation-queues/components/CreateNewAnnotationQueueItem.tsx
similarity index 100%
rename from web/src/ee/features/annotation-queues/components/CreateNewAnnotationQueueItem.tsx
rename to web/src/features/annotation-queues/components/CreateNewAnnotationQueueItem.tsx
diff --git a/web/src/ee/features/annotation-queues/components/CreateOrEditAnnotationQueueButton.tsx b/web/src/features/annotation-queues/components/CreateOrEditAnnotationQueueButton.tsx
similarity index 98%
rename from web/src/ee/features/annotation-queues/components/CreateOrEditAnnotationQueueButton.tsx
rename to web/src/features/annotation-queues/components/CreateOrEditAnnotationQueueButton.tsx
index d1e74c8c44..6349b9f925 100644
--- a/web/src/ee/features/annotation-queues/components/CreateOrEditAnnotationQueueButton.tsx
+++ b/web/src/features/annotation-queues/components/CreateOrEditAnnotationQueueButton.tsx
@@ -33,10 +33,7 @@ import { getScoreDataTypeIcon } from "@/src/features/scores/components/ScoreDeta
import { MultiSelectKeyValues } from "@/src/features/scores/components/multi-select-key-values";
import { useRouter } from "next/router";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
-import {
- useHasEntitlement,
- useEntitlementLimit,
-} from "@/src/features/entitlements/hooks";
+import { useEntitlementLimit } from "@/src/features/entitlements/hooks";
import { ActionButton } from "@/src/components/ActionButton";
import { DropdownMenuItem } from "@/src/components/ui/dropdown-menu";
import { useUniqueNameValidation } from "@/src/hooks/useUniqueNameValidation";
@@ -57,7 +54,6 @@ export const CreateOrEditAnnotationQueueButton = ({
projectId: projectId,
scope: "annotationQueues:CUD",
});
- const hasEntitlement = useHasEntitlement("annotation-queues");
const queueLimit = useEntitlementLimit("annotation-queue-count");
const router = useRouter();
const capture = usePostHogClientCapture();
@@ -186,7 +182,6 @@ export const CreateOrEditAnnotationQueueButton = ({
)
}
hasAccess={hasAccess}
- hasEntitlement={hasEntitlement}
limitValue={queueCountData.data}
limit={queueLimit}
size={size}
diff --git a/web/src/ee/features/annotation-queues/components/DeleteAnnotationQueueButton.tsx b/web/src/features/annotation-queues/components/DeleteAnnotationQueueButton.tsx
similarity index 100%
rename from web/src/ee/features/annotation-queues/components/DeleteAnnotationQueueButton.tsx
rename to web/src/features/annotation-queues/components/DeleteAnnotationQueueButton.tsx
diff --git a/web/src/ee/features/annotation-queues/pages/AnnotationQueueItems.tsx b/web/src/features/annotation-queues/pages/AnnotationQueueItems.tsx
similarity index 89%
rename from web/src/ee/features/annotation-queues/pages/AnnotationQueueItems.tsx
rename to web/src/features/annotation-queues/pages/AnnotationQueueItems.tsx
index 9103f2de04..0fd056ecbf 100644
--- a/web/src/ee/features/annotation-queues/pages/AnnotationQueueItems.tsx
+++ b/web/src/features/annotation-queues/pages/AnnotationQueueItems.tsx
@@ -1,15 +1,14 @@
import { api } from "@/src/utils/api";
import { useRouter } from "next/router";
-import { AnnotationQueueItemsTable } from "@/src/ee/features/annotation-queues/components/AnnotationQueueItemsTable";
+import { AnnotationQueueItemsTable } from "@/src/features/annotation-queues/components/AnnotationQueueItemsTable";
import { CardDescription } from "@/src/components/ui/card";
import { Button } from "@/src/components/ui/button";
import { ClipboardPen, Lock } from "lucide-react";
import { Badge } from "@/src/components/ui/badge";
import { getScoreDataTypeIcon } from "@/src/features/scores/components/ScoreDetailColumnHelpers";
import Link from "next/link";
-import { CreateOrEditAnnotationQueueButton } from "@/src/ee/features/annotation-queues/components/CreateOrEditAnnotationQueueButton";
+import { CreateOrEditAnnotationQueueButton } from "@/src/features/annotation-queues/components/CreateOrEditAnnotationQueueButton";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
import { SupportOrUpgradePage } from "@/src/ee/features/billing/components/SupportOrUpgradePage";
import { Skeleton } from "@/src/components/ui/skeleton";
import Page from "@/src/components/layouts/page";
@@ -39,8 +38,8 @@ export default function QueueItems() {
projectId,
scope: "annotationQueues:CUD",
});
- const hasEntitlement = useHasEntitlement("annotation-queues");
- if (!hasReadAccess || !hasEntitlement) return <SupportOrUpgradePage />;
+
+ if (!hasReadAccess) return <SupportOrUpgradePage />;
return (
<Page
diff --git a/web/src/ee/features/annotation-queues/pages/AnnotationQueues.tsx b/web/src/features/annotation-queues/pages/AnnotationQueues.tsx
similarity index 78%
rename from web/src/ee/features/annotation-queues/pages/AnnotationQueues.tsx
rename to web/src/features/annotation-queues/pages/AnnotationQueues.tsx
index 3d12908419..aedea09fb7 100644
--- a/web/src/ee/features/annotation-queues/pages/AnnotationQueues.tsx
+++ b/web/src/features/annotation-queues/pages/AnnotationQueues.tsx
@@ -1,12 +1,11 @@
import { useRouter } from "next/router";
-import { AnnotationQueuesTable } from "@/src/ee/features/annotation-queues/components/AnnotationQueuesTable";
+import { AnnotationQueuesTable } from "@/src/features/annotation-queues/components/AnnotationQueuesTable";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
import { SupportOrUpgradePage } from "@/src/ee/features/billing/components/SupportOrUpgradePage";
import Page from "@/src/components/layouts/page";
import { AnnotationQueuesOnboarding } from "@/src/components/onboarding/AnnotationQueuesOnboarding";
import { api } from "@/src/utils/api";
-import { CreateOrEditAnnotationQueueButton } from "@/src/ee/features/annotation-queues/components/CreateOrEditAnnotationQueueButton";
+import { CreateOrEditAnnotationQueueButton } from "@/src/features/annotation-queues/components/CreateOrEditAnnotationQueueButton";
export default function AnnotationQueues() {
const router = useRouter();
@@ -15,13 +14,12 @@ export default function AnnotationQueues() {
projectId: projectId,
scope: "annotationQueues:read",
});
- const hasEntitlement = useHasEntitlement("annotation-queues");
// Check if the user has any annotation queues
const { data: hasAnyQueue, isLoading } = api.annotationQueues.hasAny.useQuery(
{ projectId },
{
- enabled: !!projectId && hasEntitlement,
+ enabled: !!projectId,
trpc: {
context: {
skipBatch: true,
@@ -33,7 +31,7 @@ export default function AnnotationQueues() {
const showOnboarding = !isLoading && !hasAnyQueue;
- if (!hasAccess || !hasEntitlement) return <SupportOrUpgradePage />;
+ if (!hasAccess) return <SupportOrUpgradePage />;
return (
<Page
diff --git a/web/src/ee/features/annotation-queues/server/annotationQueueItems.ts b/web/src/features/annotation-queues/server/annotationQueueItems.ts
similarity index 92%
rename from web/src/ee/features/annotation-queues/server/annotationQueueItems.ts
rename to web/src/features/annotation-queues/server/annotationQueueItems.ts
index 0242d19776..8e6a4def1b 100644
--- a/web/src/ee/features/annotation-queues/server/annotationQueueItems.ts
+++ b/web/src/features/annotation-queues/server/annotationQueueItems.ts
@@ -1,5 +1,4 @@
import { auditLog } from "@/src/features/audit-logs/auditLog";
-import { throwIfNoEntitlement } from "@/src/features/entitlements/server/hasEntitlement";
import { throwIfNoProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
import { createBatchActionJob } from "@/src/features/table/server/createBatchActionJob";
import {
@@ -42,12 +41,6 @@ export const queueItemRouter = createTRPCRouter({
)
.query(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -114,12 +107,6 @@ export const queueItemRouter = createTRPCRouter({
)
.query(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -209,12 +196,6 @@ export const queueItemRouter = createTRPCRouter({
)
.query(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -258,12 +239,6 @@ export const queueItemRouter = createTRPCRouter({
)
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -354,12 +329,6 @@ export const queueItemRouter = createTRPCRouter({
)
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -417,12 +386,6 @@ export const queueItemRouter = createTRPCRouter({
)
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
diff --git a/web/src/ee/features/annotation-queues/server/annotationQueues.ts b/web/src/features/annotation-queues/server/annotationQueues.ts
similarity index 90%
rename from web/src/ee/features/annotation-queues/server/annotationQueues.ts
rename to web/src/features/annotation-queues/server/annotationQueues.ts
index 3f14bbdd56..a66e4572ac 100644
--- a/web/src/ee/features/annotation-queues/server/annotationQueues.ts
+++ b/web/src/features/annotation-queues/server/annotationQueues.ts
@@ -1,5 +1,4 @@
import { auditLog } from "@/src/features/audit-logs/auditLog";
-import { throwIfNoEntitlement } from "@/src/features/entitlements/server/hasEntitlement";
import { throwIfNoProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
import {
createTRPCRouter,
@@ -26,12 +25,6 @@ export const queueRouter = createTRPCRouter({
}),
)
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -57,12 +50,6 @@ export const queueRouter = createTRPCRouter({
)
.query(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -147,12 +134,6 @@ export const queueRouter = createTRPCRouter({
)
.query(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
const queueNamesAndIds = await ctx.prisma.annotationQueue.findMany({
where: {
projectId: input.projectId,
@@ -197,12 +178,6 @@ export const queueRouter = createTRPCRouter({
.input(z.object({ queueId: z.string(), projectId: z.string() }))
.query(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -247,12 +222,6 @@ export const queueRouter = createTRPCRouter({
)
.query(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -316,12 +285,6 @@ export const queueRouter = createTRPCRouter({
)
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -402,12 +365,6 @@ export const queueRouter = createTRPCRouter({
)
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -459,12 +416,6 @@ export const queueRouter = createTRPCRouter({
.input(z.object({ queueId: z.string(), projectId: z.string() }))
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -504,12 +455,6 @@ export const queueRouter = createTRPCRouter({
)
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "annotation-queues",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
diff --git a/web/src/features/blobstorage-integration/blobstorage-integration-router.ts b/web/src/features/blobstorage-integration/blobstorage-integration-router.ts
index be6b6e8b2b..87d7599ad9 100644
--- a/web/src/features/blobstorage-integration/blobstorage-integration-router.ts
+++ b/web/src/features/blobstorage-integration/blobstorage-integration-router.ts
@@ -9,7 +9,6 @@ import {
import { encrypt } from "@langfuse/shared/encryption";
import { blobStorageIntegrationFormSchema } from "@/src/features/blobstorage-integration/types";
import { TRPCError } from "@trpc/server";
-import { throwIfNoEntitlement } from "@/src/features/entitlements/server/hasEntitlement";
import {
logger,
BlobStorageIntegrationProcessingQueue,
@@ -28,11 +27,6 @@ export const blobStorageIntegrationRouter = createTRPCRouter({
get: protectedProjectProcedure
.input(z.object({ projectId: z.string() }))
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "integration-blobstorage",
- sessionUser: ctx.session.user,
- projectId: input.projectId,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -66,11 +60,6 @@ export const blobStorageIntegrationRouter = createTRPCRouter({
.input(blobStorageIntegrationFormSchema.extend({ projectId: z.string() }))
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "integration-blobstorage",
- sessionUser: ctx.session.user,
- projectId: input.projectId,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -183,11 +172,6 @@ export const blobStorageIntegrationRouter = createTRPCRouter({
.input(z.object({ projectId: z.string() }))
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "integration-blobstorage",
- sessionUser: ctx.session.user,
- projectId: input.projectId,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -218,11 +202,6 @@ export const blobStorageIntegrationRouter = createTRPCRouter({
.input(z.object({ projectId: z.string() }))
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "integration-blobstorage",
- sessionUser: ctx.session.user,
- projectId: input.projectId,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -300,11 +279,6 @@ export const blobStorageIntegrationRouter = createTRPCRouter({
.input(z.object({ projectId: z.string() }))
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "integration-blobstorage",
- sessionUser: ctx.session.user,
- projectId: input.projectId,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
diff --git a/web/src/features/entitlements/constants/entitlements.ts b/web/src/features/entitlements/constants/entitlements.ts
index 1e9562e898..25f86ea2a1 100644
--- a/web/src/features/entitlements/constants/entitlements.ts
+++ b/web/src/features/entitlements/constants/entitlements.ts
@@ -3,38 +3,25 @@ import { type Plan } from "@langfuse/shared";
// Entitlements: Binary feature access
const entitlements = [
// features
- "playground",
- "model-based-evaluations",
"rbac-project-roles",
"cloud-billing",
"cloud-multi-tenant-sso",
- "integration-posthog",
- "integration-blobstorage",
- "annotation-queues",
"self-host-ui-customization",
"self-host-allowed-organization-creators",
- "prompt-experiments",
"trace-deletion", // Not in use anymore, but necessary to use the TableAction type.
"audit-logs",
"data-retention",
"prompt-protected-labels",
- "custom-dashboards",
"admin-api",
] as const;
export type Entitlement = (typeof entitlements)[number];
const cloudAllPlansEntitlements: Entitlement[] = [
- "playground",
- "model-based-evaluations",
"cloud-billing",
- "integration-posthog",
- "annotation-queues",
- "prompt-experiments",
"trace-deletion",
- "custom-dashboards",
];
-const selfHostedAllPlansEntitlements: Entitlement[] = ["trace-deletion", "custom-dashboards"];
+const selfHostedAllPlansEntitlements: Entitlement[] = ["trace-deletion"];
// Entitlement Limits: Limits on the number of resources that can be created/used
const entitlementLimits = [
@@ -96,7 +83,6 @@ export const entitlementAccess: Record<
"audit-logs",
"data-retention",
"cloud-multi-tenant-sso",
- "integration-blobstorage",
"prompt-protected-labels",
"admin-api",
],
@@ -115,7 +101,6 @@ export const entitlementAccess: Record<
"audit-logs",
"data-retention",
"cloud-multi-tenant-sso",
- "integration-blobstorage",
"prompt-protected-labels",
"admin-api",
],
@@ -128,7 +113,7 @@ export const entitlementAccess: Record<
},
},
oss: {
- entitlements: [...selfHostedAllPlansEntitlements],
+ entitlements: selfHostedAllPlansEntitlements,
entitlementLimits: {
"annotation-queue-count": 0,
"organization-member-count": false,
@@ -137,36 +122,12 @@ export const entitlementAccess: Record<
"prompt-management-count-prompts": false,
},
},
- "self-hosted:pro": {
- entitlements: [
- ...selfHostedAllPlansEntitlements,
- "annotation-queues",
- "model-based-evaluations",
- "playground",
- "prompt-experiments",
- "integration-posthog",
- "integration-blobstorage",
- ],
- entitlementLimits: {
- "annotation-queue-count": false,
- "organization-member-count": false,
- "data-access-days": false,
- "model-based-evaluations-count-evaluators": false,
- "prompt-management-count-prompts": false,
- },
- },
"self-hosted:enterprise": {
entitlements: [
...selfHostedAllPlansEntitlements,
- "annotation-queues",
- "model-based-evaluations",
- "playground",
- "prompt-experiments",
"rbac-project-roles",
"self-host-allowed-organization-creators",
"self-host-ui-customization",
- "integration-posthog",
- "integration-blobstorage",
"audit-logs",
"data-retention",
"prompt-protected-labels",
diff --git a/web/src/features/entitlements/server/getPlan.ts b/web/src/features/entitlements/server/getPlan.ts
index 164bd1511a..e6c7e2f050 100644
--- a/web/src/features/entitlements/server/getPlan.ts
+++ b/web/src/features/entitlements/server/getPlan.ts
@@ -60,8 +60,5 @@ export function getSelfHostedInstancePlanServerSide(): Plan | null {
if (licenseKey.startsWith("langfuse_ee_")) {
return "self-hosted:enterprise";
}
- if (licenseKey.startsWith("langfuse_pro_")) {
- return "self-hosted:pro";
- }
return null;
}
diff --git a/web/src/ee/features/evals/components/deactivate-config.tsx b/web/src/features/evals/components/deactivate-config.tsx
similarity index 97%
rename from web/src/ee/features/evals/components/deactivate-config.tsx
rename to web/src/features/evals/components/deactivate-config.tsx
index 310042a80b..5ed261f9ec 100644
--- a/web/src/ee/features/evals/components/deactivate-config.tsx
+++ b/web/src/features/evals/components/deactivate-config.tsx
@@ -1,4 +1,4 @@
-import { EvaluatorStatus } from "@/src/ee/features/evals/types";
+import { EvaluatorStatus } from "@/src/features/evals/types";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
import { api, type RouterOutputs } from "@/src/utils/api";
diff --git a/web/src/ee/features/evals/components/eval-form-descriptions.tsx b/web/src/features/evals/components/eval-form-descriptions.tsx
similarity index 100%
rename from web/src/ee/features/evals/components/eval-form-descriptions.tsx
rename to web/src/features/evals/components/eval-form-descriptions.tsx
diff --git a/web/src/ee/features/evals/components/eval-log.tsx b/web/src/features/evals/components/eval-log.tsx
similarity index 100%
rename from web/src/ee/features/evals/components/eval-log.tsx
rename to web/src/features/evals/components/eval-log.tsx
diff --git a/web/src/ee/features/evals/components/eval-template-detail.tsx b/web/src/features/evals/components/eval-template-detail.tsx
similarity index 99%
rename from web/src/ee/features/evals/components/eval-template-detail.tsx
rename to web/src/features/evals/components/eval-template-detail.tsx
index 976ef68a50..9ea125e01d 100644
--- a/web/src/ee/features/evals/components/eval-template-detail.tsx
+++ b/web/src/features/evals/components/eval-template-detail.tsx
@@ -1,5 +1,5 @@
import * as React from "react";
-import { EvalTemplateForm } from "@/src/ee/features/evals/components/template-form";
+import { EvalTemplateForm } from "@/src/features/evals/components/template-form";
import { api } from "@/src/utils/api";
import { type EvalTemplate } from "@langfuse/shared";
import { useRouter } from "next/router";
diff --git a/web/src/ee/features/evals/components/eval-templates-table.tsx b/web/src/features/evals/components/eval-templates-table.tsx
similarity index 95%
rename from web/src/ee/features/evals/components/eval-templates-table.tsx
rename to web/src/features/evals/components/eval-templates-table.tsx
index 66d21e5a38..eb9bb07e74 100644
--- a/web/src/ee/features/evals/components/eval-templates-table.tsx
+++ b/web/src/features/evals/components/eval-templates-table.tsx
@@ -28,19 +28,16 @@ import {
DialogHeader,
DialogTitle,
} from "@/src/components/ui/dialog";
-import { EvalTemplateForm } from "@/src/ee/features/evals/components/template-form";
+import { EvalTemplateForm } from "@/src/features/evals/components/template-form";
import { showSuccessToast } from "@/src/features/notifications/showSuccessToast";
-import { EvalReferencedEvaluators } from "@/src/ee/features/evals/types";
+import { EvalReferencedEvaluators } from "@/src/features/evals/types";
import { showErrorToast } from "@/src/features/notifications/showErrorToast";
import { type RouterInput } from "@/src/utils/types";
-import { useSingleTemplateValidation } from "@/src/ee/features/evals/hooks/useSingleTemplateValidation";
-import { getMaintainer } from "@/src/ee/features/evals/utils/typeHelpers";
-import { MaintainerTooltip } from "@/src/ee/features/evals/components/maintainer-tooltip";
+import { useSingleTemplateValidation } from "@/src/features/evals/hooks/useSingleTemplateValidation";
+import { getMaintainer } from "@/src/features/evals/utils/typeHelpers";
+import { MaintainerTooltip } from "@/src/features/evals/components/maintainer-tooltip";
import { ActionButton } from "@/src/components/ActionButton";
-import {
- useEntitlementLimit,
- useHasEntitlement,
-} from "@/src/features/entitlements/hooks";
+import { useEntitlementLimit } from "@/src/features/entitlements/hooks";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
export type EvalsTemplateRow = {
@@ -86,7 +83,6 @@ export default function EvalsTemplateTable({
});
const hasAccess = useHasProjectAccess({ projectId, scope: "evalJob:CUD" });
- const hasEntitlement = useHasEntitlement("model-based-evaluations");
const totalCount = templates.data?.totalCount ?? null;
@@ -120,7 +116,7 @@ export default function EvalsTemplateTable({
projectId,
},
{
- enabled: !!projectId && hasEntitlement,
+ enabled: !!projectId,
trpc: {
context: {
skipBatch: true,
@@ -240,7 +236,6 @@ export default function EvalsTemplateTable({
: undefined
}
hasAccess={hasAccess}
- hasEntitlement={hasEntitlement}
limitValue={countsQuery.data?.configActiveCount ?? 0}
limit={evaluatorLimit}
onClick={(e) => {
@@ -260,7 +255,7 @@ export default function EvalsTemplateTable({
variant="outline"
size="icon-xs"
title="Clone"
- disabled={!hasAccess || !hasEntitlement}
+ disabled={!hasAccess}
onClick={(e) => {
e.stopPropagation();
if (id) setCloneTemplateId(id);
@@ -274,7 +269,7 @@ export default function EvalsTemplateTable({
variant="outline"
size="icon-xs"
title="Edit"
- disabled={!hasAccess || !hasEntitlement}
+ disabled={!hasAccess}
onClick={(e) => {
e.stopPropagation();
if (id) setEditTemplateId(id);
diff --git a/web/src/ee/features/evals/components/evaluation-prompt-preview.tsx b/web/src/features/evals/components/evaluation-prompt-preview.tsx
similarity index 97%
rename from web/src/ee/features/evals/components/evaluation-prompt-preview.tsx
rename to web/src/features/evals/components/evaluation-prompt-preview.tsx
index 954adae293..888a0a42fd 100644
--- a/web/src/ee/features/evals/components/evaluation-prompt-preview.tsx
+++ b/web/src/features/evals/components/evaluation-prompt-preview.tsx
@@ -1,7 +1,7 @@
import { ItemBadge } from "@/src/components/ItemBadge";
import { Skeleton } from "@/src/components/ui/skeleton";
-import { useExtractVariables } from "@/src/ee/features/evals/hooks/useExtractVariables";
-import { type VariableMapping } from "@/src/ee/features/evals/utils/evaluator-form-utils";
+import { useExtractVariables } from "@/src/features/evals/hooks/useExtractVariables";
+import { type VariableMapping } from "@/src/features/evals/utils/evaluator-form-utils";
import { cn } from "@/src/utils/tailwind";
import { type RouterOutput } from "@/src/utils/types";
import { type EvalTemplate } from "@langfuse/shared";
diff --git a/web/src/ee/features/evals/components/evaluator-detail.tsx b/web/src/features/evals/components/evaluator-detail.tsx
similarity index 96%
rename from web/src/ee/features/evals/components/evaluator-detail.tsx
rename to web/src/features/evals/components/evaluator-detail.tsx
index 7b95f1191d..6f22d103e3 100644
--- a/web/src/ee/features/evals/components/evaluator-detail.tsx
+++ b/web/src/features/evals/components/evaluator-detail.tsx
@@ -1,7 +1,7 @@
import * as React from "react";
import { api } from "@/src/utils/api";
import { useRouter } from "next/router";
-import EvalLogTable from "@/src/ee/features/evals/components/eval-log";
+import EvalLogTable from "@/src/features/evals/components/eval-log";
import { StatusBadge } from "@/src/components/layouts/status-badge";
import { DetailPageNav } from "@/src/features/navigate-detail-pages/DetailPageNav";
import Page from "@/src/components/layouts/page";
@@ -9,7 +9,7 @@ import { LevelCountsDisplay } from "@/src/components/level-counts-display";
import {
type JobExecutionState,
generateJobExecutionCounts,
-} from "@/src/ee/features/evals/utils/job-execution-utils";
+} from "@/src/features/evals/utils/job-execution-utils";
const JobExecutionCounts = ({
jobExecutionsByState,
diff --git a/web/src/ee/features/evals/components/evaluator-form.tsx b/web/src/features/evals/components/evaluator-form.tsx
similarity index 88%
rename from web/src/ee/features/evals/components/evaluator-form.tsx
rename to web/src/features/evals/components/evaluator-form.tsx
index 5a76ea3f3a..7a77603b35 100644
--- a/web/src/ee/features/evals/components/evaluator-form.tsx
+++ b/web/src/features/evals/components/evaluator-form.tsx
@@ -1,6 +1,6 @@
import { type EvalTemplate } from "@langfuse/shared";
-import { InnerEvaluatorForm } from "@/src/ee/features/evals/components/inner-evaluator-form";
-import { type PartialConfig } from "@/src/ee/features/evals/types";
+import { InnerEvaluatorForm } from "@/src/features/evals/components/inner-evaluator-form";
+import { type PartialConfig } from "@/src/features/evals/types";
export const EvaluatorForm = (props: {
projectId: string;
diff --git a/web/src/ee/features/evals/components/evaluator-selector.tsx b/web/src/features/evals/components/evaluator-selector.tsx
similarity index 97%
rename from web/src/ee/features/evals/components/evaluator-selector.tsx
rename to web/src/features/evals/components/evaluator-selector.tsx
index c171d318f8..481f5ff46b 100644
--- a/web/src/ee/features/evals/components/evaluator-selector.tsx
+++ b/web/src/features/evals/components/evaluator-selector.tsx
@@ -16,9 +16,9 @@ import {
TooltipContent,
TooltipTrigger,
} from "@/src/components/ui/tooltip";
-import { useSingleTemplateValidation } from "@/src/ee/features/evals/hooks/useSingleTemplateValidation";
-import { getMaintainer } from "@/src/ee/features/evals/utils/typeHelpers";
-import { MaintainerTooltip } from "@/src/ee/features/evals/components/maintainer-tooltip";
+import { useSingleTemplateValidation } from "@/src/features/evals/hooks/useSingleTemplateValidation";
+import { getMaintainer } from "@/src/features/evals/utils/typeHelpers";
+import { MaintainerTooltip } from "@/src/features/evals/components/maintainer-tooltip";
import Link from "next/link";
interface EvaluatorSelectorProps {
diff --git a/web/src/ee/features/evals/components/evaluator-table.tsx b/web/src/features/evals/components/evaluator-table.tsx
similarity index 97%
rename from web/src/ee/features/evals/components/evaluator-table.tsx
rename to web/src/features/evals/components/evaluator-table.tsx
index 1d70c2694a..88e0e8bac9 100644
--- a/web/src/ee/features/evals/components/evaluator-table.tsx
+++ b/web/src/features/evals/components/evaluator-table.tsx
@@ -19,7 +19,7 @@ import {
StringParam,
} from "use-query-params";
import { z } from "zod";
-import { generateJobExecutionCounts } from "@/src/ee/features/evals/utils/job-execution-utils";
+import { generateJobExecutionCounts } from "@/src/features/evals/utils/job-execution-utils";
import { useOrderByState } from "@/src/features/orderBy/hooks/useOrderByState";
import TableIdOrName from "@/src/components/table/table-id";
import { MoreVertical, Loader2, ExternalLinkIcon, Edit } from "lucide-react";
@@ -36,12 +36,12 @@ import {
import { Button } from "@/src/components/ui/button";
import { showSuccessToast } from "@/src/features/notifications/showSuccessToast";
import { Dialog, DialogContent, DialogTitle } from "@/src/components/ui/dialog";
-import { EvaluatorForm } from "@/src/ee/features/evals/components/evaluator-form";
+import { EvaluatorForm } from "@/src/features/evals/components/evaluator-form";
import { useRouter } from "next/router";
import { DeleteEvalConfigButton } from "@/src/components/deleteButton";
import { evalConfigFilterColumns } from "@/src/server/api/definitions/evalConfigsTable";
-import { RAGAS_TEMPLATE_PREFIX } from "@/src/ee/features/evals/types";
-import { MaintainerTooltip } from "@/src/ee/features/evals/components/maintainer-tooltip";
+import { RAGAS_TEMPLATE_PREFIX } from "@/src/features/evals/types";
+import { MaintainerTooltip } from "@/src/features/evals/components/maintainer-tooltip";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
export type EvaluatorDataRow = {
diff --git a/web/src/ee/features/evals/components/execution-count-tooltip.tsx b/web/src/features/evals/components/execution-count-tooltip.tsx
similarity index 85%
rename from web/src/ee/features/evals/components/execution-count-tooltip.tsx
rename to web/src/features/evals/components/execution-count-tooltip.tsx
index 8c4b2b7e16..c68888736b 100644
--- a/web/src/ee/features/evals/components/execution-count-tooltip.tsx
+++ b/web/src/features/evals/components/execution-count-tooltip.tsx
@@ -1,7 +1,7 @@
-import { type EvalFormType } from "@/src/ee/features/evals/utils/evaluator-form-utils";
+import { type EvalFormType } from "@/src/features/evals/utils/evaluator-form-utils";
import { api } from "@/src/utils/api";
import { compactNumberFormatter } from "@/src/utils/numbers";
-import { useEvalTargetCount } from "@/src/ee/features/evals/hooks/useEvalTargetCount";
+import { useEvalTargetCount } from "@/src/features/evals/hooks/useEvalTargetCount";
type ExecutionCountTooltipProps = {
projectId: string;
diff --git a/web/src/ee/features/evals/components/inner-evaluator-form.tsx b/web/src/features/evals/components/inner-evaluator-form.tsx
similarity index 98%
rename from web/src/ee/features/evals/components/inner-evaluator-form.tsx
rename to web/src/features/evals/components/inner-evaluator-form.tsx
index a7868d1f33..58057f8ac7 100644
--- a/web/src/ee/features/evals/components/inner-evaluator-form.tsx
+++ b/web/src/features/evals/components/inner-evaluator-form.tsx
@@ -47,24 +47,24 @@ import {
isTraceOrDatasetObject,
isTraceTarget,
type LangfuseObject,
-} from "@/src/ee/features/evals/utils/evaluator-form-utils";
-import { ExecutionCountTooltip } from "@/src/ee/features/evals/components/execution-count-tooltip";
+} from "@/src/features/evals/utils/evaluator-form-utils";
+import { ExecutionCountTooltip } from "@/src/features/evals/components/execution-count-tooltip";
import {
TimeScopeDescription,
VariableMappingDescription,
-} from "@/src/ee/features/evals/components/eval-form-descriptions";
+} from "@/src/features/evals/components/eval-form-descriptions";
import { Suspense, lazy } from "react";
import {
getDateFromOption,
type TableDateRange,
} from "@/src/utils/date-range-utils";
-import { useEvalConfigMappingData } from "@/src/ee/features/evals/hooks/useEvalConfigMappingData";
-import { type PartialConfig } from "@/src/ee/features/evals/types";
+import { useEvalConfigMappingData } from "@/src/features/evals/hooks/useEvalConfigMappingData";
+import { type PartialConfig } from "@/src/features/evals/types";
import { Switch } from "@/src/components/ui/switch";
import {
EvaluationPromptPreview,
getVariableColor,
-} from "@/src/ee/features/evals/components/evaluation-prompt-preview";
+} from "@/src/features/evals/components/evaluation-prompt-preview";
import { DetailPageNav } from "@/src/features/navigate-detail-pages/DetailPageNav";
import { Skeleton } from "@/src/components/ui/skeleton";
diff --git a/web/src/ee/features/evals/components/maintainer-tooltip.tsx b/web/src/features/evals/components/maintainer-tooltip.tsx
similarity index 90%
rename from web/src/ee/features/evals/components/maintainer-tooltip.tsx
rename to web/src/features/evals/components/maintainer-tooltip.tsx
index f632268fe3..71a1c74d0b 100644
--- a/web/src/ee/features/evals/components/maintainer-tooltip.tsx
+++ b/web/src/features/evals/components/maintainer-tooltip.tsx
@@ -4,7 +4,7 @@ import {
TooltipTrigger,
TooltipContent,
} from "@/src/components/ui/tooltip";
-import { RagasLogoIcon } from "@/src/ee/features/evals/components/ragas-logo";
+import { RagasLogoIcon } from "@/src/features/evals/components/ragas-logo";
import { UserCircle2Icon } from "lucide-react";
function MaintainerIcon({ maintainer }: { maintainer: string }) {
diff --git a/web/src/ee/features/evals/components/manage-default-eval-model.tsx b/web/src/features/evals/components/manage-default-eval-model.tsx
similarity index 100%
rename from web/src/ee/features/evals/components/manage-default-eval-model.tsx
rename to web/src/features/evals/components/manage-default-eval-model.tsx
diff --git a/web/src/ee/features/evals/components/ragas-logo.tsx b/web/src/features/evals/components/ragas-logo.tsx
similarity index 100%
rename from web/src/ee/features/evals/components/ragas-logo.tsx
rename to web/src/features/evals/components/ragas-logo.tsx
diff --git a/web/src/ee/features/evals/components/run-evaluator-form.tsx b/web/src/features/evals/components/run-evaluator-form.tsx
similarity index 88%
rename from web/src/ee/features/evals/components/run-evaluator-form.tsx
rename to web/src/features/evals/components/run-evaluator-form.tsx
index 4ae73d1036..7a24100ebf 100644
--- a/web/src/ee/features/evals/components/run-evaluator-form.tsx
+++ b/web/src/features/evals/components/run-evaluator-form.tsx
@@ -1,5 +1,5 @@
import { Card } from "@/src/components/ui/card";
-import { EvaluatorForm } from "@/src/ee/features/evals/components/evaluator-form";
+import { EvaluatorForm } from "@/src/features/evals/components/evaluator-form";
import { type RouterOutputs } from "@/src/utils/api";
type RunEvaluatorFormProps = {
diff --git a/web/src/ee/features/evals/components/select-evaluator-list.tsx b/web/src/features/evals/components/select-evaluator-list.tsx
similarity index 95%
rename from web/src/ee/features/evals/components/select-evaluator-list.tsx
rename to web/src/features/evals/components/select-evaluator-list.tsx
index 4274b81d61..a31a61ebd9 100644
--- a/web/src/ee/features/evals/components/select-evaluator-list.tsx
+++ b/web/src/features/evals/components/select-evaluator-list.tsx
@@ -7,8 +7,8 @@ import { PlusIcon } from "lucide-react";
import { EvaluatorSelector } from "./evaluator-selector";
import { EvalTemplateForm } from "./template-form";
import { showSuccessToast } from "@/src/features/notifications/showSuccessToast";
-import { SetupDefaultEvalModelCard } from "@/src/ee/features/evals/components/set-up-default-eval-model-card";
-import { useTemplateValidation } from "@/src/ee/features/evals/hooks/useTemplateValidation";
+import { SetupDefaultEvalModelCard } from "@/src/features/evals/components/set-up-default-eval-model-card";
+import { useTemplateValidation } from "@/src/features/evals/hooks/useTemplateValidation";
import { Card } from "@/src/components/ui/card";
import { Skeleton } from "@/src/components/ui/skeleton";
diff --git a/web/src/ee/features/evals/components/set-up-default-eval-model-card.tsx b/web/src/features/evals/components/set-up-default-eval-model-card.tsx
similarity index 87%
rename from web/src/ee/features/evals/components/set-up-default-eval-model-card.tsx
rename to web/src/features/evals/components/set-up-default-eval-model-card.tsx
index 9e26ff56d8..c38ff2fa6a 100644
--- a/web/src/ee/features/evals/components/set-up-default-eval-model-card.tsx
+++ b/web/src/features/evals/components/set-up-default-eval-model-card.tsx
@@ -1,6 +1,6 @@
import { CardContent } from "@/src/components/ui/card";
import { Card } from "@/src/components/ui/card";
-import { ManageDefaultEvalModel } from "@/src/ee/features/evals/components/manage-default-eval-model";
+import { ManageDefaultEvalModel } from "@/src/features/evals/components/manage-default-eval-model";
export function SetupDefaultEvalModelCard({
projectId,
diff --git a/web/src/ee/features/evals/components/template-form.tsx b/web/src/features/evals/components/template-form.tsx
similarity index 97%
rename from web/src/ee/features/evals/components/template-form.tsx
rename to web/src/features/evals/components/template-form.tsx
index 1a9853feed..6d56236408 100644
--- a/web/src/ee/features/evals/components/template-form.tsx
+++ b/web/src/features/evals/components/template-form.tsx
@@ -25,16 +25,16 @@ import {
} from "@langfuse/shared";
import { PromptVariableListPreview } from "@/src/features/prompts/components/PromptVariableListPreview";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
-import { getFinalModelParams } from "@/src/ee/utils/getFinalModelParams";
-import { useModelParams } from "@/src/ee/features/playground/page/hooks/useModelParams";
+import { getFinalModelParams } from "@/src/utils/getFinalModelParams";
+import { useModelParams } from "@/src/features/playground/page/hooks/useModelParams";
import { showSuccessToast } from "@/src/features/notifications/showSuccessToast";
-import { EvalReferencedEvaluators } from "@/src/ee/features/evals/types";
+import { EvalReferencedEvaluators } from "@/src/features/evals/types";
import { CodeMirrorEditor } from "@/src/components/editor";
import { Card, CardContent } from "@/src/components/ui/card";
import { type RouterInput } from "@/src/utils/types";
-import { useEvaluationModel } from "@/src/ee/features/evals/hooks/useEvaluationModel";
+import { useEvaluationModel } from "@/src/features/evals/hooks/useEvaluationModel";
import { Checkbox } from "@/src/components/ui/checkbox";
-import { ManageDefaultEvalModel } from "@/src/ee/features/evals/components/manage-default-eval-model";
+import { ManageDefaultEvalModel } from "@/src/features/evals/components/manage-default-eval-model";
type PartialEvalTemplate = Omit<
EvalTemplate,
diff --git a/web/src/ee/features/evals/components/template-selector.tsx b/web/src/features/evals/components/template-selector.tsx
similarity index 96%
rename from web/src/ee/features/evals/components/template-selector.tsx
rename to web/src/features/evals/components/template-selector.tsx
index 5d7a8e15ea..f87a4dbfe6 100644
--- a/web/src/ee/features/evals/components/template-selector.tsx
+++ b/web/src/features/evals/components/template-selector.tsx
@@ -24,16 +24,16 @@ import {
import { cn } from "@/src/utils/tailwind";
import { Button } from "@/src/components/ui/button";
import { useState } from "react";
-import { useExperimentEvaluatorSelection } from "@/src/ee/features/experiments/hooks/useExperimentEvaluatorSelection";
-import { useTemplatesValidation } from "@/src/ee/features/evals/hooks/useTemplatesValidation";
+import { useExperimentEvaluatorSelection } from "@/src/features/experiments/hooks/useExperimentEvaluatorSelection";
+import { useTemplatesValidation } from "@/src/features/evals/hooks/useTemplatesValidation";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "@/src/components/ui/tooltip";
-import { useSingleTemplateValidation } from "@/src/ee/features/evals/hooks/useSingleTemplateValidation";
-import { getMaintainer } from "@/src/ee/features/evals/utils/typeHelpers";
-import { MaintainerTooltip } from "@/src/ee/features/evals/components/maintainer-tooltip";
+import { useSingleTemplateValidation } from "@/src/features/evals/hooks/useSingleTemplateValidation";
+import { getMaintainer } from "@/src/features/evals/utils/typeHelpers";
+import { MaintainerTooltip } from "@/src/features/evals/components/maintainer-tooltip";
type TemplateSelectorProps = {
projectId: string;
diff --git a/web/src/ee/features/evals/hooks/useEvalConfigMappingData.ts b/web/src/features/evals/hooks/useEvalConfigMappingData.ts
similarity index 94%
rename from web/src/ee/features/evals/hooks/useEvalConfigMappingData.ts
rename to web/src/features/evals/hooks/useEvalConfigMappingData.ts
index fa8c6f126b..e11166f436 100644
--- a/web/src/ee/features/evals/hooks/useEvalConfigMappingData.ts
+++ b/web/src/features/evals/hooks/useEvalConfigMappingData.ts
@@ -1,4 +1,4 @@
-import { type EvalFormType } from "@/src/ee/features/evals/utils/evaluator-form-utils";
+import { type EvalFormType } from "@/src/features/evals/utils/evaluator-form-utils";
import { api } from "@/src/utils/api";
import { type ObservationType } from "@langfuse/shared";
import { type UseFormReturn } from "react-hook-form";
diff --git a/web/src/ee/features/evals/hooks/useEvalTargetCount.ts b/web/src/features/evals/hooks/useEvalTargetCount.ts
similarity index 95%
rename from web/src/ee/features/evals/hooks/useEvalTargetCount.ts
rename to web/src/features/evals/hooks/useEvalTargetCount.ts
index 83a722220b..6e4f788d21 100644
--- a/web/src/ee/features/evals/hooks/useEvalTargetCount.ts
+++ b/web/src/features/evals/hooks/useEvalTargetCount.ts
@@ -2,7 +2,7 @@ import { api } from "@/src/utils/api";
import {
type EvalFormType,
isTraceTarget,
-} from "@/src/ee/features/evals/utils/evaluator-form-utils";
+} from "@/src/features/evals/utils/evaluator-form-utils";
interface UseEvalTargetCountProps {
projectId: string;
diff --git a/web/src/ee/features/evals/hooks/useEvaluationModel.ts b/web/src/features/evals/hooks/useEvaluationModel.ts
similarity index 100%
rename from web/src/ee/features/evals/hooks/useEvaluationModel.ts
rename to web/src/features/evals/hooks/useEvaluationModel.ts
diff --git a/web/src/ee/features/evals/hooks/useExtractVariables.ts b/web/src/features/evals/hooks/useExtractVariables.ts
similarity index 98%
rename from web/src/ee/features/evals/hooks/useExtractVariables.ts
rename to web/src/features/evals/hooks/useExtractVariables.ts
index 4b59ff301b..c1d395d3d7 100644
--- a/web/src/ee/features/evals/hooks/useExtractVariables.ts
+++ b/web/src/features/evals/hooks/useExtractVariables.ts
@@ -1,4 +1,4 @@
-import { type VariableMapping } from "@/src/ee/features/evals/utils/evaluator-form-utils";
+import { type VariableMapping } from "@/src/features/evals/utils/evaluator-form-utils";
import { api } from "@/src/utils/api";
import { extractValueFromObject } from "@langfuse/shared";
import { useEffect, useState, useRef } from "react";
diff --git a/web/src/ee/features/evals/hooks/useSingleTemplateValidation.ts b/web/src/features/evals/hooks/useSingleTemplateValidation.ts
similarity index 100%
rename from web/src/ee/features/evals/hooks/useSingleTemplateValidation.ts
rename to web/src/features/evals/hooks/useSingleTemplateValidation.ts
diff --git a/web/src/ee/features/evals/hooks/useTemplateValidation.ts b/web/src/features/evals/hooks/useTemplateValidation.ts
similarity index 100%
rename from web/src/ee/features/evals/hooks/useTemplateValidation.ts
rename to web/src/features/evals/hooks/useTemplateValidation.ts
diff --git a/web/src/ee/features/evals/hooks/useTemplatesValidation.ts b/web/src/features/evals/hooks/useTemplatesValidation.ts
similarity index 100%
rename from web/src/ee/features/evals/hooks/useTemplatesValidation.ts
rename to web/src/features/evals/hooks/useTemplatesValidation.ts
diff --git a/web/src/ee/features/evals/pages/default-evaluation-model.tsx b/web/src/features/evals/pages/default-evaluation-model.tsx
similarity index 92%
rename from web/src/ee/features/evals/pages/default-evaluation-model.tsx
rename to web/src/features/evals/pages/default-evaluation-model.tsx
index a2c915b546..62a073f4cf 100644
--- a/web/src/ee/features/evals/pages/default-evaluation-model.tsx
+++ b/web/src/features/evals/pages/default-evaluation-model.tsx
@@ -1,19 +1,18 @@
import Page from "@/src/components/layouts/page";
import { useRouter } from "next/router";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
import { SupportOrUpgradePage } from "@/src/ee/features/billing/components/SupportOrUpgradePage";
import { ModelParameters } from "@/src/components/ModelParameters";
import { CardContent } from "@/src/components/ui/card";
import { Card } from "@/src/components/ui/card";
-import { useModelParams } from "@/src/ee/features/playground/page/hooks/useModelParams";
+import { useModelParams } from "@/src/features/playground/page/hooks/useModelParams";
import { Button } from "@/src/components/ui/button";
import { api } from "@/src/utils/api";
import { showSuccessToast } from "@/src/features/notifications/showSuccessToast";
import { Skeleton } from "@/src/components/ui/skeleton";
-import { useEvaluationModel } from "@/src/ee/features/evals/hooks/useEvaluationModel";
+import { useEvaluationModel } from "@/src/features/evals/hooks/useEvaluationModel";
import { DeleteEvaluationModelButton } from "@/src/components/deleteButton";
-import { ManageDefaultEvalModel } from "@/src/ee/features/evals/components/manage-default-eval-model";
+import { ManageDefaultEvalModel } from "@/src/features/evals/components/manage-default-eval-model";
import { useState } from "react";
import { DialogContent, DialogTrigger } from "@/src/components/ui/dialog";
import { Dialog } from "@/src/components/ui/dialog";
@@ -25,7 +24,6 @@ export default function DefaultEvaluationModelPage() {
const utils = api.useUtils();
const [isEditing, setIsEditing] = useState(false);
- const hasEntitlement = useHasEntitlement("model-based-evaluations");
const hasWriteAccess = useHasProjectAccess({
projectId,
scope: "evalDefaultModel:CUD",
@@ -66,7 +64,7 @@ export default function DefaultEvaluationModelPage() {
return <Skeleton className="h-[500px] w-full" />;
}
- if (!hasReadAccess || !hasEntitlement) {
+ if (!hasReadAccess) {
return <SupportOrUpgradePage />;
}
diff --git a/web/src/ee/features/evals/pages/evaluators.tsx b/web/src/features/evals/pages/evaluators.tsx
similarity index 89%
rename from web/src/ee/features/evals/pages/evaluators.tsx
rename to web/src/features/evals/pages/evaluators.tsx
index 6cb48be7e3..c5e9eb24c1 100644
--- a/web/src/ee/features/evals/pages/evaluators.tsx
+++ b/web/src/features/evals/pages/evaluators.tsx
@@ -3,7 +3,7 @@ import { useRouter } from "next/router";
import Link from "next/link";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
import { Plus } from "lucide-react";
-import EvaluatorTable from "@/src/ee/features/evals/components/evaluator-table";
+import EvaluatorTable from "@/src/features/evals/components/evaluator-table";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
import {
TabsBar,
@@ -12,13 +12,10 @@ import {
} from "@/src/components/ui/tabs-bar";
import { ActionButton } from "@/src/components/ActionButton";
import { api } from "@/src/utils/api";
-import {
- useEntitlementLimit,
- useHasEntitlement,
-} from "@/src/features/entitlements/hooks";
+import { useEntitlementLimit } from "@/src/features/entitlements/hooks";
import { SupportOrUpgradePage } from "@/src/ee/features/billing/components/SupportOrUpgradePage";
import { EvaluatorsOnboarding } from "@/src/components/onboarding/EvaluatorsOnboarding";
-import { ManageDefaultEvalModel } from "@/src/ee/features/evals/components/manage-default-eval-model";
+import { ManageDefaultEvalModel } from "@/src/features/evals/components/manage-default-eval-model";
export default function EvaluatorsPage() {
const router = useRouter();
@@ -28,7 +25,6 @@ export default function EvaluatorsPage() {
const evaluatorLimit = useEntitlementLimit(
"model-based-evaluations-count-evaluators",
);
- const hasEntitlement = useHasEntitlement("model-based-evaluations");
const hasWriteAccess = useHasProjectAccess({
projectId,
scope: "evalJob:CUD",
@@ -45,7 +41,7 @@ export default function EvaluatorsPage() {
projectId,
},
{
- enabled: !!projectId && hasEntitlement,
+ enabled: !!projectId,
trpc: {
context: {
skipBatch: true,
@@ -58,7 +54,7 @@ export default function EvaluatorsPage() {
countsQuery.data?.configCount === 0 &&
countsQuery.data?.templateCount === 0;
- if (!hasReadAccess || !hasEntitlement) {
+ if (!hasReadAccess) {
return <SupportOrUpgradePage />;
}
diff --git a/web/src/ee/features/evals/pages/new-evaluator.tsx b/web/src/features/evals/pages/new-evaluator.tsx
similarity index 84%
rename from web/src/ee/features/evals/pages/new-evaluator.tsx
rename to web/src/features/evals/pages/new-evaluator.tsx
index b4a1e2ceff..7bd062801f 100644
--- a/web/src/ee/features/evals/pages/new-evaluator.tsx
+++ b/web/src/features/evals/pages/new-evaluator.tsx
@@ -7,14 +7,13 @@ import { cn } from "@/src/utils/tailwind";
import { BreadcrumbList } from "@/src/components/ui/breadcrumb";
import { Breadcrumb } from "@/src/components/ui/breadcrumb";
import { useRouter } from "next/router";
-import { SelectEvaluatorList } from "@/src/ee/features/evals/components/select-evaluator-list";
-import { RunEvaluatorForm } from "@/src/ee/features/evals/components/run-evaluator-form";
+import { SelectEvaluatorList } from "@/src/features/evals/components/select-evaluator-list";
+import { RunEvaluatorForm } from "@/src/features/evals/components/run-evaluator-form";
import { api } from "@/src/utils/api";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
-import { getMaintainer } from "@/src/ee/features/evals/utils/typeHelpers";
-import { MaintainerTooltip } from "@/src/ee/features/evals/components/maintainer-tooltip";
-import { ManageDefaultEvalModel } from "@/src/ee/features/evals/components/manage-default-eval-model";
+import { getMaintainer } from "@/src/features/evals/utils/typeHelpers";
+import { MaintainerTooltip } from "@/src/features/evals/components/maintainer-tooltip";
+import { ManageDefaultEvalModel } from "@/src/features/evals/components/manage-default-eval-model";
// Multi-step setup process
// 1. Select Evaluator: /project/:projectId/evals/new
@@ -30,7 +29,6 @@ export default function NewEvaluatorPage() {
projectId,
scope: "evalTemplate:CUD",
});
- const hasEntityAccess = useHasEntitlement("model-based-evaluations");
const evalTemplates = api.evals.allTemplates.useQuery(
{
@@ -39,7 +37,7 @@ export default function NewEvaluatorPage() {
page: 0,
},
{
- enabled: hasAccess && hasEntityAccess,
+ enabled: hasAccess,
},
);
@@ -47,7 +45,7 @@ export default function NewEvaluatorPage() {
(t) => t.id === evaluatorId,
);
- if (!hasAccess || !hasEntityAccess) {
+ if (!hasAccess) {
return <div>You do not have access to this page.</div>;
}
diff --git a/web/src/ee/features/evals/pages/new-template.tsx b/web/src/features/evals/pages/new-template.tsx
similarity index 90%
rename from web/src/ee/features/evals/pages/new-template.tsx
rename to web/src/features/evals/pages/new-template.tsx
index 7591122236..840b6472aa 100644
--- a/web/src/ee/features/evals/pages/new-template.tsx
+++ b/web/src/features/evals/pages/new-template.tsx
@@ -1,5 +1,5 @@
import Page from "@/src/components/layouts/page";
-import { EvalTemplateForm } from "@/src/ee/features/evals/components/template-form";
+import { EvalTemplateForm } from "@/src/features/evals/components/template-form";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
import { useRouter } from "next/router";
diff --git a/web/src/ee/features/evals/pages/templates.tsx b/web/src/features/evals/pages/templates.tsx
similarity index 92%
rename from web/src/ee/features/evals/pages/templates.tsx
rename to web/src/features/evals/pages/templates.tsx
index 11aee3b8ac..79a1d2d660 100644
--- a/web/src/ee/features/evals/pages/templates.tsx
+++ b/web/src/features/evals/pages/templates.tsx
@@ -4,14 +4,14 @@ import { Button } from "@/src/components/ui/button";
import Link from "next/link";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
import { Lock, Plus } from "lucide-react";
-import EvalsTemplateTable from "@/src/ee/features/evals/components/eval-templates-table";
+import EvalsTemplateTable from "@/src/features/evals/components/eval-templates-table";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
import {
TabsBar,
TabsBarList,
TabsBarTrigger,
} from "@/src/components/ui/tabs-bar";
-import { ManageDefaultEvalModel } from "@/src/ee/features/evals/components/manage-default-eval-model";
+import { ManageDefaultEvalModel } from "@/src/features/evals/components/manage-default-eval-model";
export default function TemplatesPage() {
const router = useRouter();
diff --git a/web/src/ee/features/evals/server/addDatasetRunItemsToEvalQueue.ts b/web/src/features/evals/server/addDatasetRunItemsToEvalQueue.ts
similarity index 100%
rename from web/src/ee/features/evals/server/addDatasetRunItemsToEvalQueue.ts
rename to web/src/features/evals/server/addDatasetRunItemsToEvalQueue.ts
diff --git a/web/src/ee/features/evals/server/defaultEvalModelRouter.ts b/web/src/features/evals/server/defaultEvalModelRouter.ts
similarity index 83%
rename from web/src/ee/features/evals/server/defaultEvalModelRouter.ts
rename to web/src/features/evals/server/defaultEvalModelRouter.ts
index b6202c2936..cacc19d90d 100644
--- a/web/src/ee/features/evals/server/defaultEvalModelRouter.ts
+++ b/web/src/features/evals/server/defaultEvalModelRouter.ts
@@ -1,5 +1,4 @@
import { throwIfNoProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
-import { throwIfNoEntitlement } from "@/src/features/entitlements/server/hasEntitlement";
import {
createTRPCRouter,
protectedProjectProcedure,
@@ -17,12 +16,6 @@ export const defaultEvalModelRouter = createTRPCRouter({
fetchDefaultModel: protectedProjectProcedure
.input(z.object({ projectId: z.string() }))
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -42,12 +35,6 @@ export const defaultEvalModelRouter = createTRPCRouter({
}),
)
.mutation(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -68,12 +55,6 @@ export const defaultEvalModelRouter = createTRPCRouter({
deleteDefaultModel: protectedProjectProcedure
.input(z.object({ projectId: z.string() }))
.mutation(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
diff --git a/web/src/ee/features/evals/server/router.ts b/web/src/features/evals/server/router.ts
similarity index 93%
rename from web/src/ee/features/evals/server/router.ts
rename to web/src/features/evals/server/router.ts
index 61e29077ea..d657c07aed 100644
--- a/web/src/ee/features/evals/server/router.ts
+++ b/web/src/features/evals/server/router.ts
@@ -21,7 +21,6 @@ import {
jsonSchema,
} from "@langfuse/shared";
import { decrypt } from "@langfuse/shared/encryption";
-import { throwIfNoEntitlement } from "@/src/features/entitlements/server/hasEntitlement";
import {
decryptAndParseExtraHeaders,
fetchLLMCompletion,
@@ -36,14 +35,14 @@ import {
DefaultEvalModelService,
} from "@langfuse/shared/src/server";
import { TRPCError } from "@trpc/server";
-import { EvalReferencedEvaluators } from "@/src/ee/features/evals/types";
+import { EvalReferencedEvaluators } from "@/src/features/evals/types";
import { EvaluatorStatus } from "../types";
import { traceException } from "@langfuse/shared/src/server";
import { isNotNullOrUndefined } from "@/src/utils/types";
import { v4 as uuidv4 } from "uuid";
import { env } from "@/src/env.mjs";
import { type JobExecution, type PrismaClient } from "@prisma/client";
-import { type JobExecutionState } from "@/src/ee/features/evals/utils/job-execution-utils";
+import { type JobExecutionState } from "@/src/features/evals/utils/job-execution-utils";
import {
evalConfigFilterColumns,
evalConfigsTableCols,
@@ -202,12 +201,6 @@ export const evalRouter = createTRPCRouter({
globalJobConfigs: protectedProjectProcedure
.input(z.object({ projectId: z.string() }))
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -218,12 +211,6 @@ export const evalRouter = createTRPCRouter({
counts: protectedProjectProcedure
.input(z.object({ projectId: z.string() }))
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -270,12 +257,6 @@ export const evalRouter = createTRPCRouter({
}),
)
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
-
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -389,11 +370,6 @@ export const evalRouter = createTRPCRouter({
}),
)
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -440,11 +416,6 @@ export const evalRouter = createTRPCRouter({
}),
)
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -476,11 +447,6 @@ export const evalRouter = createTRPCRouter({
}),
)
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -576,11 +542,6 @@ export const evalRouter = createTRPCRouter({
}),
)
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -606,11 +567,6 @@ export const evalRouter = createTRPCRouter({
}),
)
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -644,11 +600,6 @@ export const evalRouter = createTRPCRouter({
.input(z.object({ projectId: z.string(), evalTemplateName: z.string() }))
.query(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -688,11 +639,6 @@ export const evalRouter = createTRPCRouter({
jobConfigsByTarget: protectedProjectProcedure
.input(z.object({ projectId: z.string(), targetObject: z.string() }))
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -716,11 +662,6 @@ export const evalRouter = createTRPCRouter({
.input(z.object({ projectId: z.string(), evalTemplateName: z.string() }))
.query(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -761,11 +702,6 @@ export const evalRouter = createTRPCRouter({
.input(CreateEvalJobSchema)
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -851,11 +787,6 @@ export const evalRouter = createTRPCRouter({
createTemplate: protectedProjectProcedure
.input(CreateEvalTemplate)
.mutation(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -1068,11 +999,6 @@ export const evalRouter = createTRPCRouter({
ctx,
input: { projectId, evalTemplateId, datasetId, newStatus },
}) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: projectId,
@@ -1125,11 +1051,6 @@ export const evalRouter = createTRPCRouter({
}),
)
.mutation(async ({ ctx, input: { config, projectId, evalConfigId } }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: projectId,
@@ -1241,11 +1162,6 @@ export const evalRouter = createTRPCRouter({
deleteEvalJob: protectedProjectProcedure
.input(z.object({ projectId: z.string(), evalConfigId: z.string() }))
.mutation(async ({ ctx, input: { projectId, evalConfigId } }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: projectId,
@@ -1340,11 +1256,6 @@ export const evalRouter = createTRPCRouter({
}),
)
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -1426,11 +1337,6 @@ export const evalRouter = createTRPCRouter({
jobConfigsByDatasetId: protectedProjectProcedure
.input(z.object({ projectId: z.string(), datasetId: z.string() }))
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "model-based-evaluations",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
diff --git a/web/src/ee/features/evals/types.ts b/web/src/features/evals/types.ts
similarity index 100%
rename from web/src/ee/features/evals/types.ts
rename to web/src/features/evals/types.ts
diff --git a/web/src/ee/features/evals/utils/evaluator-form-utils.ts b/web/src/features/evals/utils/evaluator-form-utils.ts
similarity index 100%
rename from web/src/ee/features/evals/utils/evaluator-form-utils.ts
rename to web/src/features/evals/utils/evaluator-form-utils.ts
diff --git a/web/src/ee/features/evals/utils/job-execution-utils.ts b/web/src/features/evals/utils/job-execution-utils.ts
similarity index 100%
rename from web/src/ee/features/evals/utils/job-execution-utils.ts
rename to web/src/features/evals/utils/job-execution-utils.ts
diff --git a/web/src/ee/features/evals/utils/typeHelpers.ts b/web/src/features/evals/utils/typeHelpers.ts
similarity index 100%
rename from web/src/ee/features/evals/utils/typeHelpers.ts
rename to web/src/features/evals/utils/typeHelpers.ts
diff --git a/web/src/ee/features/experiments/components/CreateExperimentsForm.tsx b/web/src/features/experiments/components/CreateExperimentsForm.tsx
similarity index 90%
rename from web/src/ee/features/experiments/components/CreateExperimentsForm.tsx
rename to web/src/features/experiments/components/CreateExperimentsForm.tsx
index 98a9ebf113..f41f17261f 100644
--- a/web/src/ee/features/experiments/components/CreateExperimentsForm.tsx
+++ b/web/src/features/experiments/components/CreateExperimentsForm.tsx
@@ -51,7 +51,7 @@ import {
CardFooter,
} from "@/src/components/ui/card";
import { showErrorToast } from "@/src/features/notifications/showErrorToast";
-import { useModelParams } from "@/src/ee/features/playground/page/hooks/useModelParams";
+import { useModelParams } from "@/src/features/playground/page/hooks/useModelParams";
import { ZodModelConfig } from "@langfuse/shared";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
import { Skeleton } from "@/src/components/ui/skeleton";
@@ -64,18 +64,17 @@ import {
DialogContent,
} from "@/src/components/ui/dialog";
import Link from "next/link";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
-import { TemplateSelector } from "@/src/ee/features/evals/components/template-selector";
-import { EvaluatorForm } from "@/src/ee/features/evals/components/evaluator-form";
-import { useEvaluatorDefaults } from "@/src/ee/features/experiments/hooks/useEvaluatorDefaults";
-import { useExperimentEvaluatorData } from "@/src/ee/features/experiments/hooks/useExperimentEvaluatorData";
+import { TemplateSelector } from "@/src/features/evals/components/template-selector";
+import { EvaluatorForm } from "@/src/features/evals/components/evaluator-form";
+import { useEvaluatorDefaults } from "@/src/features/experiments/hooks/useEvaluatorDefaults";
+import { useExperimentEvaluatorData } from "@/src/features/experiments/hooks/useExperimentEvaluatorData";
import { z } from "zod";
import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
-import { getFinalModelParams } from "@/src/ee/utils/getFinalModelParams";
-import { useExperimentNameValidation } from "@/src/ee/features/experiments/hooks/useExperimentNameValidation";
-import { useExperimentPromptData } from "@/src/ee/features/experiments/hooks/useExperimentPromptData";
+import { getFinalModelParams } from "@/src/utils/getFinalModelParams";
+import { useExperimentNameValidation } from "@/src/features/experiments/hooks/useExperimentNameValidation";
+import { useExperimentPromptData } from "@/src/features/experiments/hooks/useExperimentPromptData";
const CreateExperimentData = z.object({
name: z
@@ -127,9 +126,7 @@ export const CreateExperimentsForm = ({
}) => {
const [open, setOpen] = useState(false);
const capture = usePostHogClientCapture();
- const hasPromptExperimentEntitlement =
- useHasEntitlement("prompt-experiments");
- const hasEvalEntitlement = useHasEntitlement("model-based-evaluations");
+
const [selectedPromptName, setSelectedPromptName] = useState<string>(
promptDefault?.name ?? "",
);
@@ -173,14 +170,14 @@ export const CreateExperimentsForm = ({
const evaluators = api.evals.jobConfigsByTarget.useQuery(
{ projectId, targetObject: "dataset" },
{
- enabled: hasEvalReadAccess && !!datasetId && hasEvalEntitlement,
+ enabled: hasEvalReadAccess && !!datasetId,
},
);
const evalTemplates = api.evals.allTemplates.useQuery(
{ projectId },
{
- enabled: hasEvalReadAccess && hasEvalEntitlement,
+ enabled: hasEvalReadAccess,
},
);
@@ -196,7 +193,7 @@ export const CreateExperimentsForm = ({
refetchOnWindowFocus: false,
refetchOnReconnect: false,
staleTime: Infinity,
- enabled: hasPromptExperimentEntitlement,
+ enabled: true,
},
);
@@ -229,7 +226,7 @@ export const CreateExperimentsForm = ({
datasetId: datasetId as string,
},
{
- enabled: Boolean(promptId && datasetId) && hasPromptExperimentEntitlement,
+ enabled: Boolean(promptId && datasetId),
},
);
@@ -296,46 +293,44 @@ export const CreateExperimentsForm = ({
</DialogDescription>
</DialogHeader>
<div className="flex flex-col gap-2 sm:flex-row">
- {hasPromptExperimentEntitlement && (
- <Card className="flex flex-1 flex-col">
- <CardHeader>
- <CardTitle className="flex items-center gap-2 text-lg">
- <Wand2 className="size-4" />
- Prompt Experiment
- </CardTitle>
- <CardDescription>
- Test single prompts and model configurations via Langfuse UI
- </CardDescription>
- </CardHeader>
- <CardContent>
- <ul className="list-disc space-y-2 pl-4 text-sm text-muted-foreground">
- <li>Compare prompt versions</li>
- <li>Compare model configurations</li>
- <li>No code required</li>
- </ul>
- </CardContent>
- <CardFooter className="mt-auto flex flex-row gap-2">
- <Button
- className="w-full"
- onClick={() => setShowPromptForm(true)}
- >
- Create
- </Button>
- <Button
- variant="secondary"
- className="w-full"
- asChild
- onClick={() =>
- capture("dataset_run:view_prompt_experiment_docs")
- }
- >
- <Link href="https://langfuse.com/docs/datasets/prompt-experiments">
- View Docs
- </Link>
- </Button>
- </CardFooter>
- </Card>
- )}
+ <Card className="flex flex-1 flex-col">
+ <CardHeader>
+ <CardTitle className="flex items-center gap-2 text-lg">
+ <Wand2 className="size-4" />
+ Prompt Experiment
+ </CardTitle>
+ <CardDescription>
+ Test single prompts and model configurations via Langfuse UI
+ </CardDescription>
+ </CardHeader>
+ <CardContent>
+ <ul className="list-disc space-y-2 pl-4 text-sm text-muted-foreground">
+ <li>Compare prompt versions</li>
+ <li>Compare model configurations</li>
+ <li>No code required</li>
+ </ul>
+ </CardContent>
+ <CardFooter className="mt-auto flex flex-row gap-2">
+ <Button
+ className="w-full"
+ onClick={() => setShowPromptForm(true)}
+ >
+ Create
+ </Button>
+ <Button
+ variant="secondary"
+ className="w-full"
+ asChild
+ onClick={() =>
+ capture("dataset_run:view_prompt_experiment_docs")
+ }
+ >
+ <Link href="https://langfuse.com/docs/datasets/prompt-experiments">
+ View Docs
+ </Link>
+ </Button>
+ </CardFooter>
+ </Card>
<Card className="flex flex-1 flex-col">
<CardHeader>
@@ -376,11 +371,6 @@ export const CreateExperimentsForm = ({
</>
);
}
-
- if (!hasPromptExperimentEntitlement) {
- return null;
- }
-
if (
!promptsByName ||
!datasets.data ||
diff --git a/web/src/ee/features/experiments/hooks/useEvaluatorDefaults.ts b/web/src/features/experiments/hooks/useEvaluatorDefaults.ts
similarity index 95%
rename from web/src/ee/features/experiments/hooks/useEvaluatorDefaults.ts
rename to web/src/features/experiments/hooks/useEvaluatorDefaults.ts
index 8e71a6ccd2..27911d2f72 100644
--- a/web/src/ee/features/experiments/hooks/useEvaluatorDefaults.ts
+++ b/web/src/features/experiments/hooks/useEvaluatorDefaults.ts
@@ -1,7 +1,7 @@
import { Decimal } from "decimal.js";
import { type EvalTemplate } from "@langfuse/shared";
import { createDefaultVariableMappings } from "../utils/evaluatorMappingUtils";
-import { type PartialConfig } from "@/src/ee/features/evals/types";
+import { type PartialConfig } from "@/src/features/evals/types";
export const CONFIG_BASE = {
targetObject: "dataset",
diff --git a/web/src/ee/features/experiments/hooks/useExperimentEvaluatorData.ts b/web/src/features/experiments/hooks/useExperimentEvaluatorData.ts
similarity index 98%
rename from web/src/ee/features/experiments/hooks/useExperimentEvaluatorData.ts
rename to web/src/features/experiments/hooks/useExperimentEvaluatorData.ts
index c9d73c9288..f0ce895cc1 100644
--- a/web/src/ee/features/experiments/hooks/useExperimentEvaluatorData.ts
+++ b/web/src/features/experiments/hooks/useExperimentEvaluatorData.ts
@@ -1,7 +1,7 @@
import { useState, useCallback, useMemo } from "react";
import { type EvalTemplate } from "@langfuse/shared";
import { type RouterOutputs } from "@/src/utils/api";
-import { type PartialConfig } from "@/src/ee/features/evals/types";
+import { type PartialConfig } from "@/src/features/evals/types";
import { partition } from "lodash";
const partitionEvaluators = (
diff --git a/web/src/ee/features/experiments/hooks/useExperimentEvaluatorSelection.ts b/web/src/features/experiments/hooks/useExperimentEvaluatorSelection.ts
similarity index 100%
rename from web/src/ee/features/experiments/hooks/useExperimentEvaluatorSelection.ts
rename to web/src/features/experiments/hooks/useExperimentEvaluatorSelection.ts
diff --git a/web/src/ee/features/experiments/hooks/useExperimentNameValidation.ts b/web/src/features/experiments/hooks/useExperimentNameValidation.ts
similarity index 100%
rename from web/src/ee/features/experiments/hooks/useExperimentNameValidation.ts
rename to web/src/features/experiments/hooks/useExperimentNameValidation.ts
diff --git a/web/src/ee/features/experiments/hooks/useExperimentPromptData.ts b/web/src/features/experiments/hooks/useExperimentPromptData.ts
similarity index 80%
rename from web/src/ee/features/experiments/hooks/useExperimentPromptData.ts
rename to web/src/features/experiments/hooks/useExperimentPromptData.ts
index 1c58fa81ab..90e1e20998 100644
--- a/web/src/ee/features/experiments/hooks/useExperimentPromptData.ts
+++ b/web/src/features/experiments/hooks/useExperimentPromptData.ts
@@ -3,7 +3,6 @@ import { api } from "@/src/utils/api";
import { type UseFormReturn } from "react-hook-form";
import { extractVariables } from "@langfuse/shared";
import { PromptType } from "@/src/features/prompts/server/utils/validation";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
type ExperimentPromptDataProps = {
projectId: string;
@@ -14,18 +13,11 @@ export function useExperimentPromptData({
projectId,
form,
}: ExperimentPromptDataProps) {
- const hasPromptExperimentEntitlement =
- useHasEntitlement("prompt-experiments");
const promptId = form.watch("promptId");
- const promptMeta = api.prompts.allPromptMeta.useQuery(
- {
- projectId,
- },
- {
- enabled: hasPromptExperimentEntitlement,
- },
- );
+ const promptMeta = api.prompts.allPromptMeta.useQuery({
+ projectId,
+ });
const expectedColumns = useMemo(() => {
const prompt = promptMeta.data?.find((p) => p.id === promptId);
diff --git a/web/src/ee/features/experiments/server/router.ts b/web/src/features/experiments/server/router.ts
similarity index 93%
rename from web/src/ee/features/experiments/server/router.ts
rename to web/src/features/experiments/server/router.ts
index 6230385214..5afd956ed6 100644
--- a/web/src/ee/features/experiments/server/router.ts
+++ b/web/src/features/experiments/server/router.ts
@@ -20,7 +20,6 @@ import {
datasetItemMatchesVariable,
UnauthorizedError,
} from "@langfuse/shared";
-import { throwIfNoEntitlement } from "@/src/features/entitlements/server/hasEntitlement";
import { throwIfNoProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
const ValidConfigResponse = z.object({
@@ -72,11 +71,6 @@ export const experimentsRouter = createTRPCRouter({
)
.output(ConfigResponse)
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "prompt-experiments",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -160,11 +154,6 @@ export const experimentsRouter = createTRPCRouter({
}),
)
.mutation(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "prompt-experiments",
- projectId: input.projectId,
- sessionUser: ctx.session.user,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
diff --git a/web/src/ee/features/experiments/utils/evaluatorMappingUtils.ts b/web/src/features/experiments/utils/evaluatorMappingUtils.ts
similarity index 100%
rename from web/src/ee/features/experiments/utils/evaluatorMappingUtils.ts
rename to web/src/features/experiments/utils/evaluatorMappingUtils.ts
diff --git a/web/src/ee/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx b/web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx
similarity index 100%
rename from web/src/ee/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx
rename to web/src/features/playground/page/components/CreateOrEditLLMSchemaDialog.tsx
diff --git a/web/src/ee/features/playground/page/components/CreateOrEditLLMToolDialog.tsx b/web/src/features/playground/page/components/CreateOrEditLLMToolDialog.tsx
similarity index 100%
rename from web/src/ee/features/playground/page/components/CreateOrEditLLMToolDialog.tsx
rename to web/src/features/playground/page/components/CreateOrEditLLMToolDialog.tsx
diff --git a/web/src/ee/features/playground/page/components/GenerationOutput.tsx b/web/src/features/playground/page/components/GenerationOutput.tsx
similarity index 100%
rename from web/src/ee/features/playground/page/components/GenerationOutput.tsx
rename to web/src/features/playground/page/components/GenerationOutput.tsx
diff --git a/web/src/ee/features/playground/page/components/JumpToPlaygroundButton.tsx b/web/src/features/playground/page/components/JumpToPlaygroundButton.tsx
similarity index 97%
rename from web/src/ee/features/playground/page/components/JumpToPlaygroundButton.tsx
rename to web/src/features/playground/page/components/JumpToPlaygroundButton.tsx
index 7f396d633a..4b141b0145 100644
--- a/web/src/ee/features/playground/page/components/JumpToPlaygroundButton.tsx
+++ b/web/src/features/playground/page/components/JumpToPlaygroundButton.tsx
@@ -5,12 +5,12 @@ import { z } from "zod";
import { createEmptyMessage } from "@/src/components/ChatMessages/utils/createEmptyMessage";
import { Button } from "@/src/components/ui/button";
-import usePlaygroundCache from "@/src/ee/features/playground/page/hooks/usePlaygroundCache";
+import usePlaygroundCache from "@/src/features/playground/page/hooks/usePlaygroundCache";
import {
type PlaygroundTool,
type PlaygroundCache,
type PlaygroundSchema,
-} from "@/src/ee/features/playground/page/types";
+} from "@/src/features/playground/page/types";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
import { PromptType } from "@/src/features/prompts/server/utils/validation";
import useProjectIdFromURL from "@/src/hooks/useProjectIdFromURL";
@@ -29,7 +29,6 @@ import {
OpenAIResponseFormatSchema,
type Prisma,
} from "@langfuse/shared";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
import { api } from "@/src/utils/api";
import { cn } from "@/src/utils/tailwind";
@@ -62,7 +61,6 @@ export const JumpToPlaygroundButton: React.FC<JumpToPlaygroundButtonProps> = (
const { setPlaygroundCache } = usePlaygroundCache();
const [capturedState, setCapturedState] = useState<PlaygroundCache>(null);
const [isAvailable, setIsAvailable] = useState<boolean>(false);
- const isEntitled = useHasEntitlement("playground");
const apiKeys = api.llmApiKey.all.useQuery(
{
@@ -114,8 +112,6 @@ export const JumpToPlaygroundButton: React.FC<JumpToPlaygroundButtonProps> = (
router.push(`/project/${projectId}/playground`);
};
- if (!isEntitled) return null;
-
return (
<Button
variant={props.variant ?? "secondary"}
diff --git a/web/src/ee/features/playground/page/components/Messages.tsx b/web/src/features/playground/page/components/Messages.tsx
similarity index 94%
rename from web/src/ee/features/playground/page/components/Messages.tsx
rename to web/src/features/playground/page/components/Messages.tsx
index ee170d4156..1bd1f00b75 100644
--- a/web/src/ee/features/playground/page/components/Messages.tsx
+++ b/web/src/features/playground/page/components/Messages.tsx
@@ -1,5 +1,5 @@
import { Button } from "@/src/components/ui/button";
-import { usePlaygroundContext } from "@/src/ee/features/playground/page/context";
+import { usePlaygroundContext } from "@/src/features/playground/page/context";
import { GenerationOutput } from "./GenerationOutput";
import { ChatMessages } from "@/src/components/ChatMessages";
diff --git a/web/src/ee/features/playground/page/components/PlaygroundTools/index.tsx b/web/src/features/playground/page/components/PlaygroundTools/index.tsx
similarity index 97%
rename from web/src/ee/features/playground/page/components/PlaygroundTools/index.tsx
rename to web/src/features/playground/page/components/PlaygroundTools/index.tsx
index f9f4568651..6fd91fe567 100644
--- a/web/src/ee/features/playground/page/components/PlaygroundTools/index.tsx
+++ b/web/src/features/playground/page/components/PlaygroundTools/index.tsx
@@ -1,13 +1,13 @@
import React, { useCallback, useEffect, useState } from "react";
-import { usePlaygroundContext } from "@/src/ee/features/playground/page/context";
+import { usePlaygroundContext } from "@/src/features/playground/page/context";
import { Button } from "@/src/components/ui/button";
import { ScrollArea } from "@/src/components/ui/scroll-area";
import { PlusIcon, PencilIcon, MinusCircle, WrenchIcon } from "lucide-react";
import { type LlmTool } from "@prisma/client";
import { api } from "@/src/utils/api";
import useProjectIdFromURL from "@/src/hooks/useProjectIdFromURL";
-import { CreateOrEditLLMToolDialog } from "@/src/ee/features/playground/page/components/CreateOrEditLLMToolDialog";
+import { CreateOrEditLLMToolDialog } from "@/src/features/playground/page/components/CreateOrEditLLMToolDialog";
import {
Command,
CommandEmpty,
@@ -23,7 +23,7 @@ import {
PopoverTrigger,
} from "@/src/components/ui/popover";
-import { type PlaygroundTool } from "@/src/ee/features/playground/page/types";
+import { type PlaygroundTool } from "@/src/features/playground/page/types";
export const PlaygroundTools = () => {
const { tools, setTools } = usePlaygroundContext();
diff --git a/web/src/ee/features/playground/page/components/PromptVariableComponent.tsx b/web/src/features/playground/page/components/PromptVariableComponent.tsx
similarity index 100%
rename from web/src/ee/features/playground/page/components/PromptVariableComponent.tsx
rename to web/src/features/playground/page/components/PromptVariableComponent.tsx
diff --git a/web/src/ee/features/playground/page/components/ResetPlaygroundButton.tsx b/web/src/features/playground/page/components/ResetPlaygroundButton.tsx
similarity index 70%
rename from web/src/ee/features/playground/page/components/ResetPlaygroundButton.tsx
rename to web/src/features/playground/page/components/ResetPlaygroundButton.tsx
index e5d77553b6..620b0bfb44 100644
--- a/web/src/ee/features/playground/page/components/ResetPlaygroundButton.tsx
+++ b/web/src/features/playground/page/components/ResetPlaygroundButton.tsx
@@ -2,11 +2,9 @@ import { ListRestartIcon } from "lucide-react";
import { useRouter } from "next/router";
import { Button } from "@/src/components/ui/button";
-import usePlaygroundCache from "@/src/ee/features/playground/page/hooks/usePlaygroundCache";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
+import usePlaygroundCache from "@/src/features/playground/page/hooks/usePlaygroundCache";
export const ResetPlaygroundButton: React.FC = () => {
- const available = useHasEntitlement("playground");
const router = useRouter();
const { setPlaygroundCache } = usePlaygroundCache();
@@ -16,8 +14,6 @@ export const ResetPlaygroundButton: React.FC = () => {
router.reload();
};
- if (!available) return null;
-
return (
<Button
variant={"outline"}
diff --git a/web/src/ee/features/playground/page/components/SaveToPromptButton.tsx b/web/src/features/playground/page/components/SaveToPromptButton.tsx
similarity index 94%
rename from web/src/ee/features/playground/page/components/SaveToPromptButton.tsx
rename to web/src/features/playground/page/components/SaveToPromptButton.tsx
index 4caf1a7595..c13cf6e930 100644
--- a/web/src/ee/features/playground/page/components/SaveToPromptButton.tsx
+++ b/web/src/features/playground/page/components/SaveToPromptButton.tsx
@@ -17,18 +17,16 @@ import {
PopoverContent,
PopoverTrigger,
} from "@/src/components/ui/popover";
-import { usePlaygroundContext } from "@/src/ee/features/playground/page/context";
-import usePlaygroundCache from "@/src/ee/features/playground/page/hooks/usePlaygroundCache";
+import { usePlaygroundContext } from "@/src/features/playground/page/context";
+import usePlaygroundCache from "@/src/features/playground/page/hooks/usePlaygroundCache";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
import { PromptType } from "@/src/features/prompts/server/utils/validation";
import useProjectIdFromURL from "@/src/hooks/useProjectIdFromURL";
import { api } from "@/src/utils/api";
import { cn } from "@/src/utils/tailwind";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
import DocPopup from "@/src/components/layouts/doc-popup";
export const SaveToPromptButton: React.FC = () => {
- const available = useHasEntitlement("playground");
const [selectedPromptId, setSelectedPromptId] = useState("");
const { modelParams, messages, output, promptVariables } =
usePlaygroundContext();
@@ -81,8 +79,6 @@ export const SaveToPromptButton: React.FC = () => {
);
};
- if (!available) return null;
-
return (
<Popover>
<PopoverTrigger asChild>
diff --git a/web/src/ee/features/playground/page/components/StructuredOutputSchemaSection.tsx b/web/src/features/playground/page/components/StructuredOutputSchemaSection.tsx
similarity index 97%
rename from web/src/ee/features/playground/page/components/StructuredOutputSchemaSection.tsx
rename to web/src/features/playground/page/components/StructuredOutputSchemaSection.tsx
index 6f1b0281b5..7421e5cb9d 100644
--- a/web/src/ee/features/playground/page/components/StructuredOutputSchemaSection.tsx
+++ b/web/src/features/playground/page/components/StructuredOutputSchemaSection.tsx
@@ -1,13 +1,13 @@
import React, { useState, useCallback, useEffect } from "react";
-import { usePlaygroundContext } from "@/src/ee/features/playground/page/context";
+import { usePlaygroundContext } from "@/src/features/playground/page/context";
import { Button } from "@/src/components/ui/button";
import { ScrollArea } from "@/src/components/ui/scroll-area";
import { PlusIcon, PencilIcon, MinusCircle, BoxIcon } from "lucide-react";
import { type LlmSchema } from "@langfuse/shared";
import { api } from "@/src/utils/api";
import useProjectIdFromURL from "@/src/hooks/useProjectIdFromURL";
-import { CreateOrEditLLMSchemaDialog } from "@/src/ee/features/playground/page/components/CreateOrEditLLMSchemaDialog";
+import { CreateOrEditLLMSchemaDialog } from "@/src/features/playground/page/components/CreateOrEditLLMSchemaDialog";
import {
Command,
CommandEmpty,
@@ -22,7 +22,7 @@ import {
PopoverContent,
PopoverTrigger,
} from "@/src/components/ui/popover";
-import { type PlaygroundSchema } from "@/src/ee/features/playground/page/types";
+import { type PlaygroundSchema } from "@/src/features/playground/page/types";
export const StructuredOutputSchemaSection = () => {
const { structuredOutputSchema, setStructuredOutputSchema } =
diff --git a/web/src/ee/features/playground/page/components/Variables.tsx b/web/src/features/playground/page/components/Variables.tsx
similarity index 100%
rename from web/src/ee/features/playground/page/components/Variables.tsx
rename to web/src/features/playground/page/components/Variables.tsx
diff --git a/web/src/ee/features/playground/page/context/index.tsx b/web/src/features/playground/page/context/index.tsx
similarity index 97%
rename from web/src/ee/features/playground/page/context/index.tsx
rename to web/src/features/playground/page/context/index.tsx
index 02b17f3277..50fc3f9c47 100644
--- a/web/src/ee/features/playground/page/context/index.tsx
+++ b/web/src/features/playground/page/context/index.tsx
@@ -10,10 +10,9 @@ import React, {
import { v4 as uuidv4 } from "uuid";
import { createEmptyMessage } from "@/src/components/ChatMessages/utils/createEmptyMessage";
-import useCommandEnter from "@/src/ee/features/playground/page/hooks/useCommandEnter";
-import { useModelParams } from "@/src/ee/features/playground/page/hooks/useModelParams";
-import usePlaygroundCache from "@/src/ee/features/playground/page/hooks/usePlaygroundCache";
-import { getFinalModelParams } from "@/src/ee/utils/getFinalModelParams";
+import useCommandEnter from "@/src/features/playground/page/hooks/useCommandEnter";
+import { useModelParams } from "@/src/features/playground/page/hooks/useModelParams";
+import usePlaygroundCache from "@/src/features/playground/page/hooks/usePlaygroundCache";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
import useProjectIdFromURL from "@/src/hooks/useProjectIdFromURL";
import {
@@ -35,7 +34,8 @@ import { env } from "@/src/env.mjs";
import {
type PlaygroundSchema,
type PlaygroundTool,
-} from "@/src/ee/features/playground/page/types";
+} from "@/src/features/playground/page/types";
+import { getFinalModelParams } from "@/src/utils/getFinalModelParams";
type PlaygroundContextType = {
promptVariables: PromptVariable[];
diff --git a/web/src/ee/features/playground/page/hooks/useCommandEnter.ts b/web/src/features/playground/page/hooks/useCommandEnter.ts
similarity index 100%
rename from web/src/ee/features/playground/page/hooks/useCommandEnter.ts
rename to web/src/features/playground/page/hooks/useCommandEnter.ts
diff --git a/web/src/ee/features/playground/page/hooks/useModelParams.ts b/web/src/features/playground/page/hooks/useModelParams.ts
similarity index 100%
rename from web/src/ee/features/playground/page/hooks/useModelParams.ts
rename to web/src/features/playground/page/hooks/useModelParams.ts
diff --git a/web/src/ee/features/playground/page/hooks/usePlaygroundCache.ts b/web/src/features/playground/page/hooks/usePlaygroundCache.ts
similarity index 73%
rename from web/src/ee/features/playground/page/hooks/usePlaygroundCache.ts
rename to web/src/features/playground/page/hooks/usePlaygroundCache.ts
index 109bd6a879..d738369456 100644
--- a/web/src/ee/features/playground/page/hooks/usePlaygroundCache.ts
+++ b/web/src/features/playground/page/hooks/usePlaygroundCache.ts
@@ -1,13 +1,12 @@
import { useEffect, useState } from "react";
import { type PlaygroundCache } from "../types";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
const playgroundCacheKey = "playgroundCache";
export default function usePlaygroundCache() {
const [cache, setCache] = useState<PlaygroundCache>(null);
- const available = useHasEntitlement("playground");
+
const setPlaygroundCache = (cache: PlaygroundCache) => {
sessionStorage.setItem(playgroundCacheKey, JSON.stringify(cache));
};
@@ -24,7 +23,7 @@ export default function usePlaygroundCache() {
}, []);
return {
- playgroundCache: available ? cache : null,
- setPlaygroundCache: available ? setPlaygroundCache : () => {},
+ playgroundCache: cache,
+ setPlaygroundCache: setPlaygroundCache,
};
}
diff --git a/web/src/ee/features/playground/page/index.tsx b/web/src/features/playground/page/index.tsx
similarity index 56%
rename from web/src/ee/features/playground/page/index.tsx
rename to web/src/features/playground/page/index.tsx
index 906fea9b6f..9734044918 100644
--- a/web/src/ee/features/playground/page/index.tsx
+++ b/web/src/features/playground/page/index.tsx
@@ -1,13 +1,10 @@
-import { ResetPlaygroundButton } from "@/src/ee/features/playground/page/components/ResetPlaygroundButton";
-import { SaveToPromptButton } from "@/src/ee/features/playground/page/components/SaveToPromptButton";
+import { ResetPlaygroundButton } from "@/src/features/playground/page/components/ResetPlaygroundButton";
+import { SaveToPromptButton } from "@/src/features/playground/page/components/SaveToPromptButton";
import Page from "@/src/components/layouts/page";
-import { PlaygroundProvider } from "@/src/ee/features/playground/page/context";
-import Playground from "@/src/ee/features/playground/page/playground";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
+import { PlaygroundProvider } from "@/src/features/playground/page/context";
+import Playground from "@/src/features/playground/page/playground";
export default function PlaygroundPage() {
- const available = useHasEntitlement("playground");
- if (!available) return null;
return (
<PlaygroundProvider>
<Page
diff --git a/web/src/ee/features/playground/page/playground.tsx b/web/src/features/playground/page/playground.tsx
similarity index 100%
rename from web/src/ee/features/playground/page/playground.tsx
rename to web/src/features/playground/page/playground.tsx
diff --git a/web/src/ee/features/playground/page/types.ts b/web/src/features/playground/page/types.ts
similarity index 100%
rename from web/src/ee/features/playground/page/types.ts
rename to web/src/features/playground/page/types.ts
diff --git a/web/src/ee/features/playground/server/analytics/posthogCallback.ts b/web/src/features/playground/server/analytics/posthogCallback.ts
similarity index 94%
rename from web/src/ee/features/playground/server/analytics/posthogCallback.ts
rename to web/src/features/playground/server/analytics/posthogCallback.ts
index 30e24e8d8e..2aa2e1c657 100644
--- a/web/src/ee/features/playground/server/analytics/posthogCallback.ts
+++ b/web/src/features/playground/server/analytics/posthogCallback.ts
@@ -1,4 +1,4 @@
-import type { ValidatedChatCompletionBody } from "@/src/ee/features/playground/server/validateChatCompletionBody";
+import type { ValidatedChatCompletionBody } from "@/src/features/playground/server/validateChatCompletionBody";
import { ServerPosthog } from "@/src/features/posthog-analytics/ServerPosthog";
import type { LLMResult } from "@langchain/core/outputs";
import { BaseCallbackHandler } from "@langchain/core/callbacks/base";
diff --git a/web/src/ee/features/playground/server/authorizeRequest.ts b/web/src/features/playground/server/authorizeRequest.ts
similarity index 61%
rename from web/src/ee/features/playground/server/authorizeRequest.ts
rename to web/src/features/playground/server/authorizeRequest.ts
index 2e65539eb1..2e20f9c4d1 100644
--- a/web/src/ee/features/playground/server/authorizeRequest.ts
+++ b/web/src/features/playground/server/authorizeRequest.ts
@@ -2,8 +2,7 @@ import { getServerSession } from "next-auth";
import { getAuthOptions } from "@/src/server/auth";
import { isProjectMemberOrAdmin } from "@/src/server/utils/checkProjectMembershipOrAdmin";
-import { ApiError, ForbiddenError, UnauthorizedError } from "@langfuse/shared";
-import { hasEntitlement } from "@/src/features/entitlements/server/hasEntitlement";
+import { ForbiddenError, UnauthorizedError } from "@langfuse/shared";
export type AuthorizeRequestResult = {
userId: string;
@@ -16,16 +15,6 @@ export const authorizeRequestOrThrow = async (
const session = await getServerSession(authOptions);
if (!session?.user) throw new UnauthorizedError("Unauthenticated");
- const playgroundEntitlement = hasEntitlement({
- entitlement: "playground",
- projectId,
- sessionUser: session.user,
- });
- if (!playgroundEntitlement)
- throw new ApiError(
- "Your organization does not have access to the playground feature.",
- );
-
if (!isProjectMemberOrAdmin(session.user, projectId))
throw new ForbiddenError("User is not a member of this project");
diff --git a/web/src/ee/features/playground/server/chatCompletionHandler.ts b/web/src/features/playground/server/chatCompletionHandler.ts
similarity index 100%
rename from web/src/ee/features/playground/server/chatCompletionHandler.ts
rename to web/src/features/playground/server/chatCompletionHandler.ts
diff --git a/web/src/ee/features/playground/server/validateChatCompletionBody.ts b/web/src/features/playground/server/validateChatCompletionBody.ts
similarity index 100%
rename from web/src/ee/features/playground/server/validateChatCompletionBody.ts
rename to web/src/features/playground/server/validateChatCompletionBody.ts
diff --git a/web/src/features/posthog-integration/posthog-integration-router.ts b/web/src/features/posthog-integration/posthog-integration-router.ts
index a1eeabde27..7d228018c0 100644
--- a/web/src/features/posthog-integration/posthog-integration-router.ts
+++ b/web/src/features/posthog-integration/posthog-integration-router.ts
@@ -9,17 +9,11 @@ import {
import { decrypt, encrypt } from "@langfuse/shared/encryption";
import { posthogIntegrationFormSchema } from "@/src/features/posthog-integration/types";
import { TRPCError } from "@trpc/server";
-import { throwIfNoEntitlement } from "@/src/features/entitlements/server/hasEntitlement";
export const posthogIntegrationRouter = createTRPCRouter({
get: protectedProjectProcedure
.input(z.object({ projectId: z.string() }))
.query(async ({ input, ctx }) => {
- throwIfNoEntitlement({
- entitlement: "integration-posthog",
- sessionUser: ctx.session.user,
- projectId: input.projectId,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -54,11 +48,6 @@ export const posthogIntegrationRouter = createTRPCRouter({
.input(posthogIntegrationFormSchema.extend({ projectId: z.string() }))
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "integration-posthog",
- sessionUser: ctx.session.user,
- projectId: input.projectId,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
@@ -101,11 +90,6 @@ export const posthogIntegrationRouter = createTRPCRouter({
.input(z.object({ projectId: z.string() }))
.mutation(async ({ input, ctx }) => {
try {
- throwIfNoEntitlement({
- entitlement: "integration-posthog",
- sessionUser: ctx.session.user,
- projectId: input.projectId,
- });
throwIfNoProjectAccess({
session: ctx.session,
projectId: input.projectId,
diff --git a/web/src/features/prompts/components/NewPromptForm/index.tsx b/web/src/features/prompts/components/NewPromptForm/index.tsx
index dbc15306a3..ac5ef3892d 100644
--- a/web/src/features/prompts/components/NewPromptForm/index.tsx
+++ b/web/src/features/prompts/components/NewPromptForm/index.tsx
@@ -48,7 +48,7 @@ import { CodeMirrorEditor } from "@/src/components/editor/CodeMirrorEditor";
import { PromptLinkingEditor } from "@/src/components/editor/PromptLinkingEditor";
import { PRODUCTION_LABEL } from "@/src/features/prompts/constants";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
-import usePlaygroundCache from "@/src/ee/features/playground/page/hooks/usePlaygroundCache";
+import usePlaygroundCache from "@/src/features/playground/page/hooks/usePlaygroundCache";
import { useQueryParam } from "use-query-params";
import { usePromptNameValidation } from "@/src/features/prompts/hooks/usePromptNameValidation";
diff --git a/web/src/features/prompts/components/prompt-detail.tsx b/web/src/features/prompts/components/prompt-detail.tsx
index 8b9a69b149..3bb45ee33b 100644
--- a/web/src/features/prompts/components/prompt-detail.tsx
+++ b/web/src/features/prompts/components/prompt-detail.tsx
@@ -23,7 +23,7 @@ import useProjectIdFromURL from "@/src/hooks/useProjectIdFromURL";
import { api } from "@/src/utils/api";
import { extractVariables } from "@langfuse/shared";
import { PromptHistoryNode } from "./prompt-history";
-import { JumpToPlaygroundButton } from "@/src/ee/features/playground/page/components/JumpToPlaygroundButton";
+import { JumpToPlaygroundButton } from "@/src/features/playground/page/components/JumpToPlaygroundButton";
import { ChatMlArraySchema } from "@/src/components/schemas/ChatMlSchema";
import Generations from "@/src/components/table/use-cases/observations";
import { FlaskConical, MoreVertical, Plus } from "lucide-react";
@@ -35,9 +35,8 @@ import {
DialogContent,
DialogTrigger,
} from "@/src/components/ui/dialog";
-import { CreateExperimentsForm } from "@/src/ee/features/experiments/components/CreateExperimentsForm";
+import { CreateExperimentsForm } from "@/src/features/experiments/components/CreateExperimentsForm";
import { useMemo, useState } from "react";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
import { showSuccessToast } from "@/src/features/notifications/showSuccessToast";
import { DuplicatePromptButton } from "@/src/features/prompts/components/duplicate-prompt";
import Page from "@/src/components/layouts/page";
@@ -122,7 +121,7 @@ export const PromptDetail = () => {
projectId,
scope: "prompts:CUD",
});
- const hasEntitlement = useHasEntitlement("prompt-experiments");
+
const hasExperimentWriteAccess = useHasProjectAccess({
projectId,
scope: "promptExperiments:CUD",
@@ -393,7 +392,7 @@ export const PromptDetail = () => {
analyticsEventName="prompt_detail:test_in_playground_button_click"
variant="outline"
/>
- {hasAccess && hasEntitlement && (
+ {hasAccess && (
<Dialog
open={isCreateExperimentDialogOpen}
onOpenChange={setIsCreateExperimentDialogOpen}
diff --git a/web/src/features/public-api/components/LLMApiKeyList.tsx b/web/src/features/public-api/components/LLMApiKeyList.tsx
index 90e5d77fd9..88fc24650a 100644
--- a/web/src/features/public-api/components/LLMApiKeyList.tsx
+++ b/web/src/features/public-api/components/LLMApiKeyList.tsx
@@ -26,7 +26,6 @@ import { api } from "@/src/utils/api";
import { DialogDescription } from "@radix-ui/react-dialog";
import { Alert, AlertDescription, AlertTitle } from "@/src/components/ui/alert";
import { CreateLLMApiKeyDialog } from "./CreateLLMApiKeyDialog";
-import { useEntitlements } from "@/src/features/entitlements/hooks";
export function LlmApiKeyList(props: { projectId: string }) {
const hasAccess = useHasProjectAccess({
@@ -34,18 +33,12 @@ export function LlmApiKeyList(props: { projectId: string }) {
scope: "llmApiKeys:read",
});
- // only show if the user has access to features that require LLM API keys
- const entitlements = useEntitlements();
- const isAvailable =
- entitlements.includes("playground") ||
- entitlements.includes("model-based-evaluations");
-
const apiKeys = api.llmApiKey.all.useQuery(
{
projectId: props.projectId,
},
{
- enabled: hasAccess && isAvailable,
+ enabled: hasAccess,
},
);
@@ -53,8 +46,6 @@ export function LlmApiKeyList(props: { projectId: string }) {
(key) => key.extraHeaderKeys.length > 0,
);
- if (!isAvailable) return null;
-
if (!hasAccess) {
return (
<div>
diff --git a/web/src/features/public-api/server/RateLimitService.ts b/web/src/features/public-api/server/RateLimitService.ts
index a04e1e562d..050f4a2819 100644
--- a/web/src/features/public-api/server/RateLimitService.ts
+++ b/web/src/features/public-api/server/RateLimitService.ts
@@ -213,7 +213,6 @@ const getPlanBasedRateLimitConfig = (
): z.infer<typeof RateLimitConfig> => {
switch (plan) {
case "oss":
- case "self-hosted:pro":
case "self-hosted:enterprise":
return {
resource,
diff --git a/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/[apiKeyId].ts b/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/[apiKeyId].ts
index 5295413ed1..99951cbffe 100644
--- a/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/[apiKeyId].ts
+++ b/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/[apiKeyId].ts
@@ -4,7 +4,7 @@ import { AdminApiAuthService } from "@/src/features/admin-api/server/adminApiAut
import {
validateQueryParams,
handleDeleteApiKey,
-} from "@/src/ee/features/admin-api/organizations/apiKeys/apiKeyById";
+} from "@/src/features/admin-api/organizations/apiKeys/apiKeyById";
import { prisma } from "@langfuse/shared/src/db";
import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";
import { getSelfHostedInstancePlanServerSide } from "@/src/features/entitlements/server/getPlan";
diff --git a/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/index.ts b/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/index.ts
index 49f510d3f7..26037b7de4 100644
--- a/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/index.ts
+++ b/web/src/pages/api/admin/organizations/[organizationId]/apiKeys/index.ts
@@ -5,7 +5,7 @@ import {
validateQueryAndExtractId,
handleGetApiKeys,
handleCreateApiKey,
-} from "@/src/ee/features/admin-api/organizations/apiKeys";
+} from "@/src/features/admin-api/organizations/apiKeys";
import { prisma } from "@langfuse/shared/src/db";
import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";
import { getSelfHostedInstancePlanServerSide } from "@/src/features/entitlements/server/getPlan";
diff --git a/web/src/pages/api/admin/organizations/[organizationId]/index.ts b/web/src/pages/api/admin/organizations/[organizationId]/index.ts
index 4cc0d58efd..2cfa5a754b 100644
--- a/web/src/pages/api/admin/organizations/[organizationId]/index.ts
+++ b/web/src/pages/api/admin/organizations/[organizationId]/index.ts
@@ -5,7 +5,7 @@ import {
handleGetOrganizationById,
handleUpdateOrganization,
handleDeleteOrganization,
-} from "@/src/ee/features/admin-api/organizations/organizationById";
+} from "@/src/features/admin-api/organizations/organizationById";
import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";
import { getSelfHostedInstancePlanServerSide } from "@/src/features/entitlements/server/getPlan";
diff --git a/web/src/pages/api/admin/organizations/index.ts b/web/src/pages/api/admin/organizations/index.ts
index a299661a45..5377c4a087 100644
--- a/web/src/pages/api/admin/organizations/index.ts
+++ b/web/src/pages/api/admin/organizations/index.ts
@@ -4,7 +4,7 @@ import { AdminApiAuthService } from "@/src/features/admin-api/server/adminApiAut
import {
handleGetOrganizations,
handleCreateOrganization,
-} from "@/src/ee/features/admin-api/organizations";
+} from "@/src/features/admin-api/organizations";
import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";
import { getSelfHostedInstancePlanServerSide } from "@/src/features/entitlements/server/getPlan";
diff --git a/web/src/pages/api/public/dataset-run-items.ts b/web/src/pages/api/public/dataset-run-items.ts
index 412e7a6608..57c7b37b56 100644
--- a/web/src/pages/api/public/dataset-run-items.ts
+++ b/web/src/pages/api/public/dataset-run-items.ts
@@ -9,7 +9,7 @@ import {
transformDbDatasetRunItemToAPIDatasetRunItem,
} from "@/src/features/public-api/types/datasets";
import { LangfuseNotFoundError, InvalidRequestError } from "@langfuse/shared";
-import { addDatasetRunItemsToEvalQueue } from "@/src/ee/features/evals/server/addDatasetRunItemsToEvalQueue";
+import { addDatasetRunItemsToEvalQueue } from "@/src/features/evals/server/addDatasetRunItemsToEvalQueue";
import { getObservationById } from "@langfuse/shared/src/server";
export default withMiddlewares({
diff --git a/web/src/pages/api/public/organizations/memberships/index.ts b/web/src/pages/api/public/organizations/memberships/index.ts
index f11213da00..9ee82f3583 100644
--- a/web/src/pages/api/public/organizations/memberships/index.ts
+++ b/web/src/pages/api/public/organizations/memberships/index.ts
@@ -5,7 +5,7 @@ import { logger, redis } from "@langfuse/shared/src/server";
import {
handleGetMemberships,
handleUpdateMembership,
-} from "@/src/ee/features/admin-api/public/organizations/memberships";
+} from "@/src/features/admin-api/memberships";
import { type NextApiRequest, type NextApiResponse } from "next";
import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";
diff --git a/web/src/pages/api/public/organizations/projects/index.ts b/web/src/pages/api/public/organizations/projects/index.ts
index 91b5a686e7..b273ec38b7 100644
--- a/web/src/pages/api/public/organizations/projects/index.ts
+++ b/web/src/pages/api/public/organizations/projects/index.ts
@@ -2,7 +2,7 @@ import { ApiAuthService } from "@/src/features/public-api/server/apiAuth";
import { cors, runMiddleware } from "@/src/features/public-api/server/cors";
import { prisma } from "@langfuse/shared/src/db";
import { logger, redis } from "@langfuse/shared/src/server";
-import { handleGetProjects } from "@/src/ee/features/admin-api/public/organizations/projects";
+import { handleGetProjects } from "@/src/features/admin-api/projects";
import { type NextApiRequest, type NextApiResponse } from "next";
import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";
@@ -68,4 +68,4 @@ export default async function handler(
error: "Internal server error",
});
}
-}
\ No newline at end of file
+}
diff --git a/web/src/pages/api/public/projects/[projectId]/apiKeys/[apiKeyId].ts b/web/src/pages/api/public/projects/[projectId]/apiKeys/[apiKeyId].ts
index 87fb9ace24..a5b81e1384 100644
--- a/web/src/pages/api/public/projects/[projectId]/apiKeys/[apiKeyId].ts
+++ b/web/src/pages/api/public/projects/[projectId]/apiKeys/[apiKeyId].ts
@@ -5,8 +5,8 @@ import { ApiAuthService } from "@/src/features/public-api/server/apiAuth";
import { cors, runMiddleware } from "@/src/features/public-api/server/cors";
import {
validateQueryParams,
- handleDeleteApiKey
-} from "@/src/ee/features/admin-api/public/projects/projectById/apiKeys/apiKeyById";
+ handleDeleteApiKey,
+} from "@/src/features/admin-api/projects/projectById/apiKeys/apiKeyById";
import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";
export default async function handler(
diff --git a/web/src/pages/api/public/projects/[projectId]/apiKeys/index.ts b/web/src/pages/api/public/projects/[projectId]/apiKeys/index.ts
index bdfe6a7b3f..838566d3b1 100644
--- a/web/src/pages/api/public/projects/[projectId]/apiKeys/index.ts
+++ b/web/src/pages/api/public/projects/[projectId]/apiKeys/index.ts
@@ -3,11 +3,11 @@ import { prisma } from "@langfuse/shared/src/db";
import { logger, redis } from "@langfuse/shared/src/server";
import { ApiAuthService } from "@/src/features/public-api/server/apiAuth";
import { cors, runMiddleware } from "@/src/features/public-api/server/cors";
-import {
+import {
validateQueryAndExtractId,
handleGetApiKeys,
- handleCreateApiKey
-} from "@/src/ee/features/admin-api/public/projects/projectById/apiKeys";
+ handleCreateApiKey,
+} from "@/src/features/admin-api/projects/projectById/apiKeys";
import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";
export default async function handler(
@@ -80,7 +80,12 @@ export default async function handler(
case "GET":
return await handleGetApiKeys(req, res, projectId);
case "POST":
- return await handleCreateApiKey(req, res, projectId, authCheck.scope.orgId);
+ return await handleCreateApiKey(
+ req,
+ res,
+ projectId,
+ authCheck.scope.orgId,
+ );
default:
res.status(405).json({ message: "Method Not Allowed" });
return;
diff --git a/web/src/pages/api/public/projects/[projectId]/index.ts b/web/src/pages/api/public/projects/[projectId]/index.ts
index ca5c34b272..62190fcd89 100644
--- a/web/src/pages/api/public/projects/[projectId]/index.ts
+++ b/web/src/pages/api/public/projects/[projectId]/index.ts
@@ -5,7 +5,7 @@ import { logger, redis } from "@langfuse/shared/src/server";
import {
handleUpdateProject,
handleDeleteProject,
-} from "@/src/ee/features/admin-api/public/projects/projectById";
+} from "@/src/features/admin-api/projects/projectById";
import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";
import { type NextApiRequest, type NextApiResponse } from "next";
diff --git a/web/src/pages/api/public/projects/[projectId]/memberships/index.ts b/web/src/pages/api/public/projects/[projectId]/memberships/index.ts
index c39af18dda..e8f3bcdea2 100644
--- a/web/src/pages/api/public/projects/[projectId]/memberships/index.ts
+++ b/web/src/pages/api/public/projects/[projectId]/memberships/index.ts
@@ -5,8 +5,8 @@ import { logger, redis } from "@langfuse/shared/src/server";
import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";
import {
handleGetMemberships,
- handleUpdateMembership
-} from "@/src/ee/features/admin-api/public/projects/projectById/memberships";
+ handleUpdateMembership,
+} from "@/src/features/admin-api/projects/projectById/memberships";
import { type NextApiRequest, type NextApiResponse } from "next";
@@ -100,7 +100,12 @@ export default async function handler(
case "GET":
return handleGetMemberships(req, res, projectId, authCheck.scope.orgId);
case "PUT":
- return handleUpdateMembership(req, res, projectId, authCheck.scope.orgId);
+ return handleUpdateMembership(
+ req,
+ res,
+ projectId,
+ authCheck.scope.orgId,
+ );
default:
// This should never happen due to the check at the beginning
return res.status(405).json({
diff --git a/web/src/pages/api/public/projects/index.ts b/web/src/pages/api/public/projects/index.ts
index 489690f5a2..b56e40daf3 100644
--- a/web/src/pages/api/public/projects/index.ts
+++ b/web/src/pages/api/public/projects/index.ts
@@ -2,7 +2,7 @@ import { ApiAuthService } from "@/src/features/public-api/server/apiAuth";
import { cors, runMiddleware } from "@/src/features/public-api/server/cors";
import { prisma } from "@langfuse/shared/src/db";
import { logger, redis } from "@langfuse/shared/src/server";
-import { handleCreateProject } from "@/src/ee/features/admin-api/public/projects/createProject";
+import { handleCreateProject } from "@/src/features/admin-api/projects/createProject";
import { type NextApiRequest, type NextApiResponse } from "next";
import { hasEntitlementBasedOnPlan } from "@/src/features/entitlements/server/hasEntitlement";
diff --git a/web/src/pages/project/[projectId]/annotation-queues.tsx b/web/src/pages/project/[projectId]/annotation-queues.tsx
index 1187d4efb7..b9532f2aa5 100644
--- a/web/src/pages/project/[projectId]/annotation-queues.tsx
+++ b/web/src/pages/project/[projectId]/annotation-queues.tsx
@@ -1,3 +1,3 @@
-import AnnotationQueues from "@/src/ee/features/annotation-queues/pages/AnnotationQueues";
+import AnnotationQueues from "@/src/features/annotation-queues/pages/AnnotationQueues";
export default AnnotationQueues;
diff --git a/web/src/pages/project/[projectId]/annotation-queues/[queueId]/index.tsx b/web/src/pages/project/[projectId]/annotation-queues/[queueId]/index.tsx
index 6baac370ac..bd8a9ada19 100644
--- a/web/src/pages/project/[projectId]/annotation-queues/[queueId]/index.tsx
+++ b/web/src/pages/project/[projectId]/annotation-queues/[queueId]/index.tsx
@@ -1,3 +1,3 @@
-import QueueItems from "@/src/ee/features/annotation-queues/pages/AnnotationQueueItems";
+import QueueItems from "@/src/features/annotation-queues/pages/AnnotationQueueItems";
export default QueueItems;
diff --git a/web/src/pages/project/[projectId]/annotation-queues/[queueId]/items/[itemId].tsx b/web/src/pages/project/[projectId]/annotation-queues/[queueId]/items/[itemId].tsx
index 57ed291f17..0c5a1d71fa 100644
--- a/web/src/pages/project/[projectId]/annotation-queues/[queueId]/items/[itemId].tsx
+++ b/web/src/pages/project/[projectId]/annotation-queues/[queueId]/items/[itemId].tsx
@@ -1,4 +1,4 @@
-import { AnnotationQueuesItem } from "@/src/ee/features/annotation-queues/components/AnnotationQueuesItem";
+import { AnnotationQueuesItem } from "@/src/features/annotation-queues/components/AnnotationQueuesItem";
import { useRouter } from "next/router";
export default function AnnotationQueues() {
diff --git a/web/src/pages/project/[projectId]/annotation-queues/[queueId]/items/index.tsx b/web/src/pages/project/[projectId]/annotation-queues/[queueId]/items/index.tsx
index aea9b56b10..3ec5138c9f 100644
--- a/web/src/pages/project/[projectId]/annotation-queues/[queueId]/items/index.tsx
+++ b/web/src/pages/project/[projectId]/annotation-queues/[queueId]/items/index.tsx
@@ -1,4 +1,4 @@
-import { AnnotationQueuesItem } from "@/src/ee/features/annotation-queues/components/AnnotationQueuesItem";
+import { AnnotationQueuesItem } from "@/src/features/annotation-queues/components/AnnotationQueuesItem";
import { useRouter } from "next/router";
export default function AnnotationQueues() {
diff --git a/web/src/pages/project/[projectId]/datasets/[datasetId]/compare.tsx b/web/src/pages/project/[projectId]/datasets/[datasetId]/compare.tsx
index fb32769ab7..26ba74e4b9 100644
--- a/web/src/pages/project/[projectId]/datasets/[datasetId]/compare.tsx
+++ b/web/src/pages/project/[projectId]/datasets/[datasetId]/compare.tsx
@@ -12,7 +12,7 @@ import {
DialogContent,
DialogTrigger,
} from "@/src/components/ui/dialog";
-import { CreateExperimentsForm } from "@/src/ee/features/experiments/components/CreateExperimentsForm";
+import { CreateExperimentsForm } from "@/src/features/experiments/components/CreateExperimentsForm";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
import { DatasetAnalytics } from "@/src/features/datasets/components/DatasetAnalytics";
import { getScoreDataTypeIcon } from "@/src/features/scores/components/ScoreDetailColumnHelpers";
diff --git a/web/src/pages/project/[projectId]/datasets/[datasetId]/index.tsx b/web/src/pages/project/[projectId]/datasets/[datasetId]/index.tsx
index 2cce5d4004..7d24ce690e 100644
--- a/web/src/pages/project/[projectId]/datasets/[datasetId]/index.tsx
+++ b/web/src/pages/project/[projectId]/datasets/[datasetId]/index.tsx
@@ -14,7 +14,6 @@ import { DuplicateDatasetButton } from "@/src/features/datasets/components/Dupli
import { useState, useCallback } from "react";
import { Bot, ChartLine, Cog, FlaskConical, MoreVertical } from "lucide-react";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
import {
Dialog,
DialogContent,
@@ -22,7 +21,7 @@ import {
DialogTrigger,
} from "@/src/components/ui/dialog";
import { Button } from "@/src/components/ui/button";
-import { CreateExperimentsForm } from "@/src/ee/features/experiments/components/CreateExperimentsForm";
+import { CreateExperimentsForm } from "@/src/features/experiments/components/CreateExperimentsForm";
import { showSuccessToast } from "@/src/features/notifications/showSuccessToast";
import { DropdownMenuItem } from "@/src/components/ui/dropdown-menu";
import { DatasetAnalytics } from "@/src/features/datasets/components/DatasetAnalytics";
@@ -40,10 +39,10 @@ import {
TabsBar,
} from "@/src/components/ui/tabs-bar";
import { Separator } from "@/src/components/ui/separator";
-import { TemplateSelector } from "@/src/ee/features/evals/components/template-selector";
-import { useEvaluatorDefaults } from "@/src/ee/features/experiments/hooks/useEvaluatorDefaults";
-import { useExperimentEvaluatorData } from "@/src/ee/features/experiments/hooks/useExperimentEvaluatorData";
-import { EvaluatorForm } from "@/src/ee/features/evals/components/evaluator-form";
+import { TemplateSelector } from "@/src/features/evals/components/template-selector";
+import { useEvaluatorDefaults } from "@/src/features/experiments/hooks/useEvaluatorDefaults";
+import { useExperimentEvaluatorData } from "@/src/features/experiments/hooks/useExperimentEvaluatorData";
+import { EvaluatorForm } from "@/src/features/evals/components/evaluator-form";
export default function Dataset() {
const router = useRouter();
@@ -51,7 +50,6 @@ export default function Dataset() {
const projectId = router.query.projectId as string;
const datasetId = router.query.datasetId as string;
const utils = api.useUtils();
- const hasEntitlement = useHasEntitlement("model-based-evaluations");
const [isCreateExperimentDialogOpen, setIsCreateExperimentDialogOpen] =
useState(false);
const [selectedMetrics, setSelectedMetrics] = useState<string[]>(
@@ -109,10 +107,6 @@ export default function Dataset() {
scope: "evalJob:CUD",
});
- const hasPromptExperimentEntitlement = useHasEntitlement(
- "model-based-evaluations",
- );
-
const evalTemplates = api.evals.allTemplates.useQuery({
projectId,
});
@@ -120,8 +114,7 @@ export default function Dataset() {
const evaluators = api.evals.jobConfigsByTarget.useQuery(
{ projectId, targetObject: "dataset" },
{
- enabled:
- hasEvalReadAccess && !!datasetId && hasPromptExperimentEntitlement,
+ enabled: hasEvalReadAccess && !!datasetId,
},
);
@@ -215,7 +208,7 @@ export default function Dataset() {
</DialogContent>
</Dialog>
- {hasEvalReadAccess && hasEntitlement && (
+ {hasEvalReadAccess && (
<div className="w-fit">
<TemplateSelector
projectId={projectId}
@@ -294,7 +287,7 @@ export default function Dataset() {
deleteConfirmation={dataset.data?.name}
/>
</DropdownMenuItem>
- {hasReadAccess && hasEntitlement && (
+ {hasReadAccess && (
<DropdownMenuItem asChild>
<Link href={`/project/${projectId}/evals?target=dataset`}>
<Bot className="ml-1 mr-2 h-4 w-4" />
diff --git a/web/src/pages/project/[projectId]/evals/[evaluatorId].tsx b/web/src/pages/project/[projectId]/evals/[evaluatorId].tsx
index 49b9de7859..ea6bec83f2 100644
--- a/web/src/pages/project/[projectId]/evals/[evaluatorId].tsx
+++ b/web/src/pages/project/[projectId]/evals/[evaluatorId].tsx
@@ -1,3 +1,3 @@
-import { EvaluatorDetail } from "@/src/ee/features/evals/components/evaluator-detail";
+import { EvaluatorDetail } from "@/src/features/evals/components/evaluator-detail";
export default EvaluatorDetail;
diff --git a/web/src/pages/project/[projectId]/evals/default-model.tsx b/web/src/pages/project/[projectId]/evals/default-model.tsx
index 1e70cc69b0..0bea2a2098 100644
--- a/web/src/pages/project/[projectId]/evals/default-model.tsx
+++ b/web/src/pages/project/[projectId]/evals/default-model.tsx
@@ -1 +1 @@
-export { default as default } from "@/src/ee/features/evals/pages/default-evaluation-model";
+export { default as default } from "@/src/features/evals/pages/default-evaluation-model";
diff --git a/web/src/pages/project/[projectId]/evals/index.tsx b/web/src/pages/project/[projectId]/evals/index.tsx
index ca88942ec5..b2abfc64f0 100644
--- a/web/src/pages/project/[projectId]/evals/index.tsx
+++ b/web/src/pages/project/[projectId]/evals/index.tsx
@@ -1 +1 @@
-export { default as default } from "@/src/ee/features/evals/pages/evaluators";
+export { default as default } from "@/src/features/evals/pages/evaluators";
diff --git a/web/src/pages/project/[projectId]/evals/new.tsx b/web/src/pages/project/[projectId]/evals/new.tsx
index 55a1799539..723bacce50 100644
--- a/web/src/pages/project/[projectId]/evals/new.tsx
+++ b/web/src/pages/project/[projectId]/evals/new.tsx
@@ -1 +1 @@
-export { default as default } from "@/src/ee/features/evals/pages/new-evaluator";
+export { default as default } from "@/src/features/evals/pages/new-evaluator";
diff --git a/web/src/pages/project/[projectId]/evals/templates/[id].tsx b/web/src/pages/project/[projectId]/evals/templates/[id].tsx
index 092f8f926f..ecc37178ee 100644
--- a/web/src/pages/project/[projectId]/evals/templates/[id].tsx
+++ b/web/src/pages/project/[projectId]/evals/templates/[id].tsx
@@ -1,3 +1,3 @@
-import { EvalTemplateDetail } from "@/src/ee/features/evals/components/eval-template-detail";
+import { EvalTemplateDetail } from "@/src/features/evals/components/eval-template-detail";
export default EvalTemplateDetail;
diff --git a/web/src/pages/project/[projectId]/evals/templates/index.tsx b/web/src/pages/project/[projectId]/evals/templates/index.tsx
index 9c98c9355c..6b003bdee9 100644
--- a/web/src/pages/project/[projectId]/evals/templates/index.tsx
+++ b/web/src/pages/project/[projectId]/evals/templates/index.tsx
@@ -1 +1 @@
-export { default as default } from "@/src/ee/features/evals/pages/templates";
+export { default as default } from "@/src/features/evals/pages/templates";
diff --git a/web/src/pages/project/[projectId]/evals/templates/new.tsx b/web/src/pages/project/[projectId]/evals/templates/new.tsx
index 9165fc376f..a05588bd15 100644
--- a/web/src/pages/project/[projectId]/evals/templates/new.tsx
+++ b/web/src/pages/project/[projectId]/evals/templates/new.tsx
@@ -1 +1 @@
-export { default as default } from "@/src/ee/features/evals/pages/new-template";
+export { default as default } from "@/src/features/evals/pages/new-template";
diff --git a/web/src/pages/project/[projectId]/playground.tsx b/web/src/pages/project/[projectId]/playground.tsx
index b379fadf89..2711758e12 100644
--- a/web/src/pages/project/[projectId]/playground.tsx
+++ b/web/src/pages/project/[projectId]/playground.tsx
@@ -1 +1 @@
-export { default as default } from "@/src/ee/features/playground/page";
+export { default as default } from "@/src/features/playground/page";
diff --git a/web/src/pages/project/[projectId]/settings/index.tsx b/web/src/pages/project/[projectId]/settings/index.tsx
index 5c55e3ba0f..ce6ebc5101 100644
--- a/web/src/pages/project/[projectId]/settings/index.tsx
+++ b/web/src/pages/project/[projectId]/settings/index.tsx
@@ -15,10 +15,7 @@ import { PostHogLogo } from "@/src/components/PosthogLogo";
import { Card } from "@/src/components/ui/card";
import { ScoreConfigSettings } from "@/src/features/scores/components/ScoreConfigSettings";
import { TransferProjectButton } from "@/src/features/projects/components/TransferProjectButton";
-import {
- useEntitlements,
- useHasEntitlement,
-} from "@/src/features/entitlements/hooks";
+import { useHasEntitlement } from "@/src/features/entitlements/hooks";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
import { useRouter } from "next/router";
import { SettingsDangerZone } from "@/src/components/SettingsDangerZone";
@@ -46,11 +43,6 @@ export function useProjectSettingsPages(): ProjectSettingsPage[] {
"prompt-protected-labels",
);
- const entitlements = useEntitlements();
- const showLLMConnectionsSettings =
- entitlements.includes("playground") ||
- entitlements.includes("model-based-evaluations");
-
if (!project || !organization || !router.query.projectId) {
return [];
}
@@ -60,7 +52,7 @@ export function useProjectSettingsPages(): ProjectSettingsPage[] {
organization,
showBillingSettings,
showRetentionSettings,
- showLLMConnectionsSettings,
+ showLLMConnectionsSettings: true,
showProtectedLabelsSettings,
});
}
@@ -250,10 +242,6 @@ export default function SettingsPage() {
}
const Integrations = (props: { projectId: string }) => {
- const hasPosthogEntitlement = useHasEntitlement("integration-posthog");
- const hasBlobStorageEntitlement = useHasEntitlement(
- "integration-blobstorage",
- );
const hasAccess = useHasProjectAccess({
projectId: props.projectId,
scope: "integrations:CRUD",
@@ -274,7 +262,6 @@ const Integrations = (props: { projectId: string }) => {
<ActionButton
variant="secondary"
hasAccess={hasAccess}
- hasEntitlement={hasPosthogEntitlement}
href={`/project/${props.projectId}/settings/integrations/posthog`}
>
Configure
@@ -301,7 +288,6 @@ const Integrations = (props: { projectId: string }) => {
<ActionButton
variant="secondary"
hasAccess={hasAccess}
- hasEntitlement={hasBlobStorageEntitlement}
href={`/project/${props.projectId}/settings/integrations/blobstorage`}
>
Configure
diff --git a/web/src/pages/project/[projectId]/settings/integrations/blobstorage.tsx b/web/src/pages/project/[projectId]/settings/integrations/blobstorage.tsx
index ed7d0e8e8d..0ed933b5e5 100644
--- a/web/src/pages/project/[projectId]/settings/integrations/blobstorage.tsx
+++ b/web/src/pages/project/[projectId]/settings/integrations/blobstorage.tsx
@@ -21,7 +21,6 @@ import {
SelectTrigger,
SelectValue,
} from "@/src/components/ui/select";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
import { env } from "@/src/env.mjs";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
import {
@@ -47,7 +46,6 @@ import {
export default function BlobStorageIntegrationSettings() {
const router = useRouter();
const projectId = router.query.projectId as string;
- const entitled = useHasEntitlement("integration-blobstorage");
const hasAccess = useHasProjectAccess({
projectId,
scope: "integrations:CRUD",
@@ -55,14 +53,13 @@ export default function BlobStorageIntegrationSettings() {
const state = api.blobStorageIntegration.get.useQuery(
{ projectId },
{
- enabled: hasAccess && entitled,
+ enabled: hasAccess,
refetchOnMount: false,
refetchOnWindowFocus: false,
refetchOnReconnect: false,
staleTime: 50 * 60 * 1000, // 50 minutes
},
);
- if (!entitled) return null;
const status =
state.isInitialLoading || !hasAccess
@@ -148,11 +145,6 @@ const BlobStorageIntegrationSettingsForm = ({
// Check if this is a self-hosted instance (no cloud region set)
const isSelfHosted = !env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION;
- // Check if user has blob storage entitlement
- const hasBlobStorageEntitlement = useHasEntitlement(
- "integration-blobstorage",
- );
-
const blobStorageForm = useForm<BlobStorageIntegrationFormSchema>({
resolver: zodResolver(blobStorageIntegrationFormSchema),
defaultValues: {
@@ -379,11 +371,9 @@ const BlobStorageIntegrationSettingsForm = ({
? "AWS Access Key ID"
: "Access Key ID"}
{/* Show optional indicator for S3 types on self-hosted instances with entitlement */}
- {isSelfHosted &&
- hasBlobStorageEntitlement &&
- integrationType === "S3" && (
- <span className="text-muted-foreground"> (optional)</span>
- )}
+ {isSelfHosted && integrationType === "S3" && (
+ <span className="text-muted-foreground"> (optional)</span>
+ )}
</FormLabel>
<FormControl>
<Input {...field} />
@@ -392,7 +382,7 @@ const BlobStorageIntegrationSettingsForm = ({
{integrationType === "AZURE_BLOB_STORAGE"
? "Your Azure storage account name"
: integrationType === "S3"
- ? isSelfHosted && hasBlobStorageEntitlement
+ ? isSelfHosted
? "Your AWS IAM user access key ID. Leave empty to use host credentials (IAM roles, instance profiles, etc.)"
: "Your AWS IAM user access key ID"
: "Access key for your S3-compatible storage"}
@@ -414,11 +404,9 @@ const BlobStorageIntegrationSettingsForm = ({
? "AWS Secret Access Key"
: "Secret Access Key"}
{/* Show optional indicator for S3 types on self-hosted instances with entitlement */}
- {isSelfHosted &&
- hasBlobStorageEntitlement &&
- integrationType === "S3" && (
- <span className="text-muted-foreground"> (optional)</span>
- )}
+ {isSelfHosted && integrationType === "S3" && (
+ <span className="text-muted-foreground"> (optional)</span>
+ )}
</FormLabel>
<FormControl>
<PasswordInput
@@ -431,7 +419,7 @@ const BlobStorageIntegrationSettingsForm = ({
{integrationType === "AZURE_BLOB_STORAGE"
? "Your Azure storage account access key"
: integrationType === "S3"
- ? isSelfHosted && hasBlobStorageEntitlement
+ ? isSelfHosted
? "Your AWS IAM user secret access key. Leave empty to use host credentials (IAM roles, instance profiles, etc.)"
: "Your AWS IAM user secret access key"
: "Secret key for your S3-compatible storage"}
diff --git a/web/src/pages/project/[projectId]/settings/integrations/posthog.tsx b/web/src/pages/project/[projectId]/settings/integrations/posthog.tsx
index ba58c9cafb..1a3b484ca6 100644
--- a/web/src/pages/project/[projectId]/settings/integrations/posthog.tsx
+++ b/web/src/pages/project/[projectId]/settings/integrations/posthog.tsx
@@ -15,7 +15,6 @@ import {
import { Input } from "@/src/components/ui/input";
import { PasswordInput } from "@/src/components/ui/password-input";
import { Switch } from "@/src/components/ui/switch";
-import { useHasEntitlement } from "@/src/features/entitlements/hooks";
import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePostHogClientCapture";
import { posthogIntegrationFormSchema } from "@/src/features/posthog-integration/types";
import { useHasProjectAccess } from "@/src/features/rbac/utils/checkProjectAccess";
@@ -32,7 +31,7 @@ import { type z } from "zod";
export default function PosthogIntegrationSettings() {
const router = useRouter();
const projectId = router.query.projectId as string;
- const entitled = useHasEntitlement("integration-posthog");
+
const hasAccess = useHasProjectAccess({
projectId,
scope: "integrations:CRUD",
@@ -40,10 +39,9 @@ export default function PosthogIntegrationSettings() {
const state = api.posthogIntegration.get.useQuery(
{ projectId },
{
- enabled: hasAccess && entitled,
+ enabled: hasAccess,
},
);
- if (!entitled) return null;
const status =
state.isInitialLoading || !hasAccess
diff --git a/web/src/server/api/root.ts b/web/src/server/api/root.ts
index 7c26f05b2f..bbb072fcba 100644
--- a/web/src/server/api/root.ts
+++ b/web/src/server/api/root.ts
@@ -13,7 +13,7 @@ import { observationsRouter } from "@/src/server/api/routers/observations";
import { sessionRouter } from "@/src/server/api/routers/sessions";
import { promptRouter } from "@/src/features/prompts/server/routers/promptRouter";
import { modelRouter } from "@/src/server/api/routers/models";
-import { evalRouter } from "@/src/ee/features/evals/server/router";
+import { evalRouter } from "@/src/features/evals/server/router";
import { posthogIntegrationRouter } from "@/src/features/posthog-integration/posthog-integration-router";
import { blobStorageIntegrationRouter } from "@/src/features/blobstorage-integration/blobstorage-integration-router";
import { llmApiKeyRouter } from "@/src/features/llm-api-key/server/router";
@@ -28,9 +28,9 @@ import { batchExportRouter } from "@/src/features/batch-exports/server/batchExpo
import { utilsRouter } from "@/src/server/api/routers/utilities";
import { uiCustomizationRouter } from "@/src/ee/features/ui-customization/uiCustomizationRouter";
import { commentsRouter } from "@/src/server/api/routers/comments";
-import { queueRouter } from "@/src/ee/features/annotation-queues/server/annotationQueues";
-import { queueItemRouter } from "@/src/ee/features/annotation-queues/server/annotationQueueItems";
-import { experimentsRouter } from "@/src/ee/features/experiments/server/router";
+import { queueRouter } from "@/src/features/annotation-queues/server/annotationQueues";
+import { queueItemRouter } from "@/src/features/annotation-queues/server/annotationQueueItems";
+import { experimentsRouter } from "@/src/features/experiments/server/router";
import { mediaRouter } from "@/src/server/api/routers/media";
import { backgroundMigrationsRouter } from "@/src/features/background-migrations/server/background-migrations-router";
import { auditLogsRouter } from "./routers/auditLogs";
@@ -38,7 +38,7 @@ import { tableRouter } from "@/src/features/table/server/tableRouter";
import { cloudStatusRouter } from "@/src/features/cloud-status-notification/server/cloud-status-router";
import { dashboardWidgetRouter } from "./routers/dashboardWidgets";
import { TableViewPresetsRouter } from "@/src/server/api/routers/tableViewPresets";
-import { defaultEvalModelRouter } from "@/src/ee/features/evals/server/defaultEvalModelRouter";
+import { defaultEvalModelRouter } from "@/src/features/evals/server/defaultEvalModelRouter";
import { plainRouter } from "@/src/features/support-chat/trpc/plain";
/**
diff --git a/web/src/ee/utils/getFinalModelParams.tsx b/web/src/utils/getFinalModelParams.tsx
similarity index 100%
rename from web/src/ee/utils/getFinalModelParams.tsx
rename to web/src/utils/getFinalModelParams.tsx
diff --git a/worker/src/__tests__/blobStorageIntegrationProcessing.test.ts b/worker/src/__tests__/blobStorageIntegrationProcessing.test.ts
index 291dd46f21..df1ce16c36 100644
--- a/worker/src/__tests__/blobStorageIntegrationProcessing.test.ts
+++ b/worker/src/__tests__/blobStorageIntegrationProcessing.test.ts
@@ -14,7 +14,7 @@ import {
} from "@langfuse/shared/src/server";
import { prisma } from "@langfuse/shared/src/db";
import { Job } from "bullmq";
-import { handleBlobStorageIntegrationProjectJob } from "../ee/integrations/blobstorage/handleBlobStorageIntegrationProjectJob";
+import { handleBlobStorageIntegrationProjectJob } from "../features/blobstorage/handleBlobStorageIntegrationProjectJob";
import {
BlobStorageIntegrationType,
BlobStorageIntegrationFileType,
diff --git a/worker/src/__tests__/evalService.filtering.test.ts b/worker/src/__tests__/evalService.filtering.test.ts
index 2f55380e8e..24dd0f3fa0 100644
--- a/worker/src/__tests__/evalService.filtering.test.ts
+++ b/worker/src/__tests__/evalService.filtering.test.ts
@@ -15,7 +15,7 @@ import { randomUUID } from "crypto";
import Decimal from "decimal.js";
import { afterAll, test as baseTest, beforeAll, describe } from "vitest";
import { z } from "zod";
-import { createEvalJobs } from "../ee/evaluation/evalService";
+import { createEvalJobs } from "../features/evaluation/evalService";
import { OpenAIServer } from "./network";
import { pruneDatabase } from "./utils";
diff --git a/worker/src/__tests__/evalService.test.ts b/worker/src/__tests__/evalService.test.ts
index 83bed6b862..5164106bbf 100644
--- a/worker/src/__tests__/evalService.test.ts
+++ b/worker/src/__tests__/evalService.test.ts
@@ -27,15 +27,14 @@ import {
expect,
test,
} from "vitest";
+import { compileHandlebarString } from "../features/utilities";
+import { OpenAIServer } from "./network";
+import { pruneDatabase } from "./utils";
import {
createEvalJobs,
evaluate,
extractVariablesFromTracingData,
-} from "../ee/evaluation/evalService";
-import { compileHandlebarString } from "../features/utilities";
-import { OpenAIServer } from "./network";
-import { pruneDatabase } from "./utils";
-
+} from "../features/evaluation/evalService";
let OPENAI_API_KEY = process.env.OPENAI_API_KEY;
const hasActiveKey = Boolean(OPENAI_API_KEY);
if (!hasActiveKey) {
diff --git a/worker/src/__tests__/experimentsService.test.ts b/worker/src/__tests__/experimentsService.test.ts
index 8f33f734de..f304a7f469 100644
--- a/worker/src/__tests__/experimentsService.test.ts
+++ b/worker/src/__tests__/experimentsService.test.ts
@@ -1,5 +1,5 @@
import { expect, test, describe, vi, beforeEach } from "vitest";
-import { createExperimentJob } from "../ee/experiments/experimentService";
+import { createExperimentJob } from "../features/experiments/experimentService";
import { Prompt, kyselyPrisma, prisma } from "@langfuse/shared/src/db";
import { randomUUID } from "crypto";
import { pruneDatabase } from "./utils";
diff --git a/worker/src/ee/integrations/blobstorage/handleBlobStorageIntegrationProjectJob.ts b/worker/src/features/blobstorage/handleBlobStorageIntegrationProjectJob.ts
similarity index 100%
rename from worker/src/ee/integrations/blobstorage/handleBlobStorageIntegrationProjectJob.ts
rename to worker/src/features/blobstorage/handleBlobStorageIntegrationProjectJob.ts
diff --git a/worker/src/ee/integrations/blobstorage/handleBlobStorageIntegrationSchedule.ts b/worker/src/features/blobstorage/handleBlobStorageIntegrationSchedule.ts
similarity index 100%
rename from worker/src/ee/integrations/blobstorage/handleBlobStorageIntegrationSchedule.ts
rename to worker/src/features/blobstorage/handleBlobStorageIntegrationSchedule.ts
diff --git a/worker/src/ee/evaluation/evalService.ts b/worker/src/features/evaluation/evalService.ts
similarity index 100%
rename from worker/src/ee/evaluation/evalService.ts
rename to worker/src/features/evaluation/evalService.ts
diff --git a/worker/src/ee/experiments/experimentService.ts b/worker/src/features/experiments/experimentService.ts
similarity index 100%
rename from worker/src/ee/experiments/experimentService.ts
rename to worker/src/features/experiments/experimentService.ts
diff --git a/worker/src/ee/integrations/posthog/handlePostHogIntegrationProjectJob.ts b/worker/src/features/posthog/handlePostHogIntegrationProjectJob.ts
similarity index 100%
rename from worker/src/ee/integrations/posthog/handlePostHogIntegrationProjectJob.ts
rename to worker/src/features/posthog/handlePostHogIntegrationProjectJob.ts
diff --git a/worker/src/ee/integrations/posthog/handlePostHogIntegrationSchedule.ts b/worker/src/features/posthog/handlePostHogIntegrationSchedule.ts
similarity index 100%
rename from worker/src/ee/integrations/posthog/handlePostHogIntegrationSchedule.ts
rename to worker/src/features/posthog/handlePostHogIntegrationSchedule.ts
diff --git a/worker/src/queues/blobStorageIntegrationQueue.ts b/worker/src/queues/blobStorageIntegrationQueue.ts
index cc37d3f3ff..2fdda4501a 100644
--- a/worker/src/queues/blobStorageIntegrationQueue.ts
+++ b/worker/src/queues/blobStorageIntegrationQueue.ts
@@ -1,7 +1,7 @@
import { Processor } from "bullmq";
import { QueueJobs, logger } from "@langfuse/shared/src/server";
-import { handleBlobStorageIntegrationSchedule } from "../ee/integrations/blobstorage/handleBlobStorageIntegrationSchedule";
-import { handleBlobStorageIntegrationProjectJob } from "../ee/integrations/blobstorage/handleBlobStorageIntegrationProjectJob";
+import { handleBlobStorageIntegrationSchedule } from "../features/blobstorage/handleBlobStorageIntegrationSchedule";
+import { handleBlobStorageIntegrationProjectJob } from "../features/blobstorage/handleBlobStorageIntegrationProjectJob";
export const blobStorageIntegrationProcessor: Processor = async (job) => {
if (job.name === QueueJobs.BlobStorageIntegrationJob) {
diff --git a/worker/src/queues/evalQueue.ts b/worker/src/queues/evalQueue.ts
index 8a1d4fbcf9..eb65d50881 100644
--- a/worker/src/queues/evalQueue.ts
+++ b/worker/src/queues/evalQueue.ts
@@ -11,7 +11,7 @@ import {
QueueJobs,
recordIncrement,
} from "@langfuse/shared/src/server";
-import { createEvalJobs, evaluate } from "../ee/evaluation/evalService";
+import { createEvalJobs, evaluate } from "../features/evaluation/evalService";
import { randomUUID } from "crypto";
export const evalJobTraceCreatorQueueProcessor = async (
diff --git a/worker/src/queues/experimentQueue.ts b/worker/src/queues/experimentQueue.ts
index b4f28a4684..c94aff071a 100644
--- a/worker/src/queues/experimentQueue.ts
+++ b/worker/src/queues/experimentQueue.ts
@@ -6,7 +6,7 @@ import {
logger,
traceException,
} from "@langfuse/shared/src/server";
-import { createExperimentJob } from "../ee/experiments/experimentService";
+import { createExperimentJob } from "../features/experiments/experimentService";
import { InvalidRequestError, LangfuseNotFoundError } from "@langfuse/shared";
import { kyselyPrisma } from "@langfuse/shared/src/db";
diff --git a/worker/src/queues/postHogIntegrationQueue.ts b/worker/src/queues/postHogIntegrationQueue.ts
index 31b7838652..dbf22782fd 100644
--- a/worker/src/queues/postHogIntegrationQueue.ts
+++ b/worker/src/queues/postHogIntegrationQueue.ts
@@ -1,7 +1,7 @@
import { Processor } from "bullmq";
import { logger, QueueJobs } from "@langfuse/shared/src/server";
-import { handlePostHogIntegrationSchedule } from "../ee/integrations/posthog/handlePostHogIntegrationSchedule";
-import { handlePostHogIntegrationProjectJob } from "../ee/integrations/posthog/handlePostHogIntegrationProjectJob";
+import { handlePostHogIntegrationSchedule } from "../features/posthog/handlePostHogIntegrationSchedule";
+import { handlePostHogIntegrationProjectJob } from "../features/posthog/handlePostHogIntegrationProjectJob";
export const postHogIntegrationProcessor: Processor = async (job) => {
if (job.name === QueueJobs.PostHogIntegrationJob) {