Skip to content

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

chore(web): adjust monitor count entitlements by plan tier (#15716)

Mark Salpeterfed74c31f195
diff --git a/web/src/__tests__/server/monitors.servertest.ts b/web/src/__tests__/server/monitors.servertest.ts
index 6fdcc4df6e..c135336777 100644
--- a/web/src/__tests__/server/monitors.servertest.ts
+++ b/web/src/__tests__/server/monitors.servertest.ts
@@ -439,9 +439,9 @@ describe("monitors trpc", () => {
describe("entitlement limit", () => {
const monitorLimit =
entitlementAccess["cloud:hobby"].entitlementLimits["monitor-count"];
- if (typeof monitorLimit !== "number") {
+ if (typeof monitorLimit !== "number" || monitorLimit < 2) {
throw new Error(
- "expected cloud:hobby monitor-count limit to be a number",
+ "expected cloud:hobby monitor-count limit to be a number >= 2; the org-scoping test needs two distinct creatable counts",
);
}
@@ -501,11 +501,15 @@ describe("monitors trpc", () => {
it("monitors.count is scoped to the caller's org", async () => {
// Two independent orgs prove the count is org-scoped, not global.
+ // Counts derive from the limit so both stay creatable, and differ so a
+ // globally-scoped count could not satisfy both assertions.
+ const countA = monitorLimit;
+ const countB = monitorLimit - 1;
const orgA = await prepare();
const orgB = await prepare();
- await seedMonitors(orgA.caller, orgA.project.id, 3);
- await seedMonitors(orgB.caller, orgB.project.id, 2);
+ await seedMonitors(orgA.caller, orgA.project.id, countA);
+ await seedMonitors(orgB.caller, orgB.project.id, countB);
const resultA = await orgA.caller.monitors.count({
projectId: orgA.project.id,
@@ -514,8 +518,8 @@ describe("monitors trpc", () => {
projectId: orgB.project.id,
});
- expect(resultA.count).toBe(3);
- expect(resultB.count).toBe(2);
+ expect(resultA.count).toBe(countA);
+ expect(resultB.count).toBe(countB);
});
});
diff --git a/web/src/features/entitlements/constants/entitlements.ts b/web/src/features/entitlements/constants/entitlements.ts
index f2dd84c536..1bac2d9c86 100644
--- a/web/src/features/entitlements/constants/entitlements.ts
+++ b/web/src/features/entitlements/constants/entitlements.ts
@@ -66,7 +66,7 @@ export const entitlementAccess: Record<
"annotation-queue-count": 1,
"model-based-evaluations-count-evaluators": false,
"prompt-management-count-prompts": false,
- "monitor-count": 20,
+ "monitor-count": 2,
},
},
"cloud:core": {
@@ -92,7 +92,7 @@ export const entitlementAccess: Record<
"data-access-days": false,
"model-based-evaluations-count-evaluators": false,
"prompt-management-count-prompts": false,
- "monitor-count": 20,
+ "monitor-count": 50,
},
},
"cloud:team": {
@@ -113,7 +113,7 @@ export const entitlementAccess: Record<
"data-access-days": false,
"model-based-evaluations-count-evaluators": false,
"prompt-management-count-prompts": false,
- "monitor-count": 20,
+ "monitor-count": 50,
},
},
"cloud:enterprise": {
@@ -134,7 +134,7 @@ export const entitlementAccess: Record<
"data-access-days": false,
"model-based-evaluations-count-evaluators": false,
"prompt-management-count-prompts": false,
- "monitor-count": 20,
+ "monitor-count": 100,
},
},
oss: {
@@ -145,7 +145,7 @@ export const entitlementAccess: Record<
"data-access-days": false,
"model-based-evaluations-count-evaluators": false,
"prompt-management-count-prompts": false,
- "monitor-count": 20,
+ "monitor-count": false,
},
},
"self-hosted:pro": {
@@ -156,7 +156,7 @@ export const entitlementAccess: Record<
"data-access-days": false,
"model-based-evaluations-count-evaluators": false,
"prompt-management-count-prompts": false,
- "monitor-count": 20,
+ "monitor-count": false,
},
},
"self-hosted:enterprise": {
@@ -176,7 +176,7 @@ export const entitlementAccess: Record<
"data-access-days": false,
"model-based-evaluations-count-evaluators": false,
"prompt-management-count-prompts": false,
- "monitor-count": 20,
+ "monitor-count": false,
},
},
};