🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
fix(cloud): only active evals count towards free plan limit (#4572)
Marc Klingen5d459f01436c
diff --git a/web/src/ee/features/evals/pages/evaluators.tsx b/web/src/ee/features/evals/pages/evaluators.tsxindex a3e7ef1f08..56819d1956 100644--- a/web/src/ee/features/evals/pages/evaluators.tsx+++ b/web/src/ee/features/evals/pages/evaluators.tsx@@ -15,9 +15,18 @@ export default function EvaluatorsPage() {const router = useRouter();const projectId = router.query.projectId as string;const capture = usePostHogClientCapture();- const evaluatorCount = api.evals.allConfigs.useQuery({++ // only fetched first page to get count of active evaluators+ // ok as this includes the first 50 active evaluators+ const evaluatorsFirstPage = api.evals.allConfigs.useQuery({projectId,- }).data?.totalCount;+ page: 0,+ limit: 50,+ });+ const evaluatorCountFirstPage = evaluatorsFirstPage.data?.configs.filter(+ (e) => e.status === "ACTIVE",+ ).length;+const evaluatorLimit = useEntitlementLimit("model-based-evaluations-count-evaluators",);@@ -51,7 +60,7 @@ export default function EvaluatorsPage() {variant="secondary"onClick={() => capture("eval_config:new_form_open")}href={`/project/${projectId}/evals/new`}- limitValue={evaluatorCount ?? 0}+ limitValue={evaluatorCountFirstPage ?? 0}limit={evaluatorLimit}>New evaluator