Skip to content

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

chore(cloud): Make UI recognize cloud:enterprise plan and add corresponding access rights and rate limits (#5975)

David Alexander Pfeifferd8a5ebc42e73
diff --git a/packages/shared/src/features/entitlements/plans.ts b/packages/shared/src/features/entitlements/plans.ts
index 60e11d7478..3b1ed8d786 100644
--- a/packages/shared/src/features/entitlements/plans.ts
+++ b/packages/shared/src/features/entitlements/plans.ts
@@ -3,6 +3,7 @@ export const planLabels = {
"cloud:hobby": "Hobby",
"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/features/entitlements/constants/entitlements.ts b/web/src/features/entitlements/constants/entitlements.ts
index a34c9be0d3..15f5b4665e 100644
--- a/web/src/features/entitlements/constants/entitlements.ts
+++ b/web/src/features/entitlements/constants/entitlements.ts
@@ -88,6 +88,21 @@ export const entitlementAccess: Record<
"prompt-management-count-prompts": false,
},
},
+ "cloud:enterprise": {
+ entitlements: [
+ ...cloudAllPlansEntitlements,
+ "rbac-project-roles",
+ "audit-logs",
+ "data-retention",
+ ],
+ entitlementLimits: {
+ "annotation-queue-count": false,
+ "organization-member-count": false,
+ "data-access-days": false,
+ "model-based-evaluations-count-evaluators": false,
+ "prompt-management-count-prompts": false,
+ },
+ },
oss: {
entitlements: [...selfHostedAllPlansEntitlements],
entitlementLimits: {
diff --git a/web/src/features/entitlements/server/getPlan.ts b/web/src/features/entitlements/server/getPlan.ts
index 49f0dac9a2..fe94a71be4 100644
--- a/web/src/features/entitlements/server/getPlan.ts
+++ b/web/src/features/entitlements/server/getPlan.ts
@@ -23,8 +23,9 @@ export function getOrganizationPlanServerSide(
case "Pro":
return "cloud:pro";
case "Team":
- case "Enterprise":
return "cloud:team";
+ case "Enterprise":
+ return "cloud:enterprise";
}
}
// stripe plan via product id
diff --git a/web/src/features/public-api/server/RateLimitService.ts b/web/src/features/public-api/server/RateLimitService.ts
index c5d4a51f1f..871ff4e83c 100644
--- a/web/src/features/public-api/server/RateLimitService.ts
+++ b/web/src/features/public-api/server/RateLimitService.ts
@@ -258,6 +258,7 @@ const getPlanBasedRateLimitConfig = (
throw new Error(`Unhandled resource case: ${exhaustiveCheckDefault}`);
}
case "cloud:team":
+ case "cloud:enterprise":
switch (resource) {
case "ingestion":
return {