Skip to content

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

feat(ai): Add toggle for AI telemetry (#13939)

Ben Bachemcdcdbf8304ab
diff --git a/packages/shared/prisma/migrations/20260529120000_add_organization_ai_telemetry_enabled/migration.sql b/packages/shared/prisma/migrations/20260529120000_add_organization_ai_telemetry_enabled/migration.sql
new file mode 100644
index 0000000000..51f50e4b80
--- /dev/null
+++ b/packages/shared/prisma/migrations/20260529120000_add_organization_ai_telemetry_enabled/migration.sql
@@ -0,0 +1 @@
+ALTER TABLE "organizations" ADD COLUMN "ai_telemetry_enabled" BOOLEAN NOT NULL DEFAULT true;
diff --git a/packages/shared/prisma/schema.prisma b/packages/shared/prisma/schema.prisma
index eb650b21b9..16caf305cb 100644
--- a/packages/shared/prisma/schema.prisma
+++ b/packages/shared/prisma/schema.prisma
@@ -102,6 +102,7 @@ model Organization {
cloudCurrentCycleUsage Int? @map("cloud_current_cycle_usage")
cloudFreeTierUsageThresholdState String? @map("cloud_free_tier_usage_threshold_state")
aiFeaturesEnabled Boolean @default(false) @map("ai_features_enabled")
+ aiTelemetryEnabled Boolean @default(true) @map("ai_telemetry_enabled")
organizationMemberships OrganizationMembership[]
projects Project[]
MembershipInvitation MembershipInvitation[]
diff --git a/packages/shared/src/server/llm/types.ts b/packages/shared/src/server/llm/types.ts
index 077b703acb..9899dc0697 100644
--- a/packages/shared/src/server/llm/types.ts
+++ b/packages/shared/src/server/llm/types.ts
@@ -528,6 +528,7 @@ export enum LangfuseInternalTraceEnvironment {
PromptExperiments = "langfuse-prompt-experiment",
LLMJudge = "langfuse-llm-as-a-judge",
CodeEval = "langfuse-code-eval",
+ NaturalLanguageFilter = "langfuse-natural-language-filter",
}
export type ProcessedTraceEvent = {
diff --git a/web/src/__tests__/server/code-eval-test-run-trpc.servertest.ts b/web/src/__tests__/server/code-eval-test-run-trpc.servertest.ts
index 6fe10e787f..22ea63330f 100644
--- a/web/src/__tests__/server/code-eval-test-run-trpc.servertest.ts
+++ b/web/src/__tests__/server/code-eval-test-run-trpc.servertest.ts
@@ -49,6 +49,7 @@ async function prepare() {
cloudConfig: undefined,
metadata: {},
aiFeaturesEnabled: true,
+ aiTelemetryEnabled: true,
projects: [
{
id: project.id,
diff --git a/web/src/__tests__/server/dashboard-v1-v2-consistency.servertest.ts b/web/src/__tests__/server/dashboard-v1-v2-consistency.servertest.ts
index f37c25bf48..0bd4e1b36e 100644
--- a/web/src/__tests__/server/dashboard-v1-v2-consistency.servertest.ts
+++ b/web/src/__tests__/server/dashboard-v1-v2-consistency.servertest.ts
@@ -477,6 +477,7 @@ describe("dashboard v1 vs v2 consistency", () => {
cloudConfig: undefined,
metadata: {},
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: true,
projects: [
{
id: projectId,
diff --git a/web/src/__tests__/server/dashboard-widget-version.servertest.ts b/web/src/__tests__/server/dashboard-widget-version.servertest.ts
index 57c09a4f84..398074d3bd 100644
--- a/web/src/__tests__/server/dashboard-widget-version.servertest.ts
+++ b/web/src/__tests__/server/dashboard-widget-version.servertest.ts
@@ -56,6 +56,7 @@ describe("dashboard widget minVersion", () => {
cloudConfig: undefined,
metadata: {},
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: true,
projects: [
{
id: projectId,
diff --git a/web/src/__tests__/server/datasets-trpc.servertest.ts b/web/src/__tests__/server/datasets-trpc.servertest.ts
index 10c37e336d..a757f42856 100644
--- a/web/src/__tests__/server/datasets-trpc.servertest.ts
+++ b/web/src/__tests__/server/datasets-trpc.servertest.ts
@@ -36,6 +36,7 @@ async function prepare() {
},
],
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: true,
},
],
featureFlags: {
diff --git a/web/src/__tests__/server/experiments-versioning.servertest.ts b/web/src/__tests__/server/experiments-versioning.servertest.ts
index be83f54c6d..956ab832b9 100644
--- a/web/src/__tests__/server/experiments-versioning.servertest.ts
+++ b/web/src/__tests__/server/experiments-versioning.servertest.ts
@@ -48,6 +48,7 @@ async function prepare() {
},
],
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: true,
},
],
featureFlags: {
diff --git a/web/src/__tests__/server/members-trpc.servertest.ts b/web/src/__tests__/server/members-trpc.servertest.ts
index 4be552e987..18da8fc3a5 100644
--- a/web/src/__tests__/server/members-trpc.servertest.ts
+++ b/web/src/__tests__/server/members-trpc.servertest.ts
@@ -71,6 +71,7 @@ function createSession(
cloudConfig: undefined,
metadata: {},
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: true,
projects: [
{
id: project.id,
diff --git a/web/src/__tests__/server/observations-trpc.servertest.ts b/web/src/__tests__/server/observations-trpc.servertest.ts
index 2a0fa7aeb1..0f68ef49d8 100644
--- a/web/src/__tests__/server/observations-trpc.servertest.ts
+++ b/web/src/__tests__/server/observations-trpc.servertest.ts
@@ -30,6 +30,7 @@ describe("traces trpc", () => {
cloudConfig: undefined,
metadata: {},
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: true,
projects: [
{
id: projectId,
diff --git a/web/src/__tests__/server/score-comparison-analytics.servertest.ts b/web/src/__tests__/server/score-comparison-analytics.servertest.ts
index e72c83d6b6..4b2335d91d 100644
--- a/web/src/__tests__/server/score-comparison-analytics.servertest.ts
+++ b/web/src/__tests__/server/score-comparison-analytics.servertest.ts
@@ -27,6 +27,7 @@ describe("Score Comparison Analytics tRPC", () => {
cloudConfig: undefined,
metadata: {},
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: true,
projects: [
{
id: projectId,
diff --git a/web/src/__tests__/server/ssoConfigRouter.servertest.ts b/web/src/__tests__/server/ssoConfigRouter.servertest.ts
index 5ae27be4a7..b4d6d9751c 100644
--- a/web/src/__tests__/server/ssoConfigRouter.servertest.ts
+++ b/web/src/__tests__/server/ssoConfigRouter.servertest.ts
@@ -76,6 +76,7 @@ function createSession(
cloudConfig: undefined,
metadata: {},
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: true,
projects: [],
},
],
diff --git a/web/src/__tests__/server/verifiedDomainRouter.servertest.ts b/web/src/__tests__/server/verifiedDomainRouter.servertest.ts
index 5cc1751f5b..5ddca17a30 100644
--- a/web/src/__tests__/server/verifiedDomainRouter.servertest.ts
+++ b/web/src/__tests__/server/verifiedDomainRouter.servertest.ts
@@ -59,6 +59,7 @@ function createSession(
cloudConfig: undefined,
metadata: {},
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: true,
projects: [],
},
],
diff --git a/web/src/features/evals/utils/evaluator-constants.ts b/web/src/features/evals/utils/evaluator-constants.ts
index 9369dad126..5713640319 100644
--- a/web/src/features/evals/utils/evaluator-constants.ts
+++ b/web/src/features/evals/utils/evaluator-constants.ts
@@ -41,6 +41,7 @@ export const OUTPUT_MAPPING = [
export const INTERNAL_ENVIRONMENTS = [
LangfuseInternalTraceEnvironment.LLMJudge,
LangfuseInternalTraceEnvironment.CodeEval,
+ LangfuseInternalTraceEnvironment.NaturalLanguageFilter,
"langfuse-prompt-experiment",
"langfuse-evaluation",
"sdk-experiment",
diff --git a/web/src/features/filters/constants/internal-environments.ts b/web/src/features/filters/constants/internal-environments.ts
index 1a0d9705bc..e7b9008c1e 100644
--- a/web/src/features/filters/constants/internal-environments.ts
+++ b/web/src/features/filters/constants/internal-environments.ts
@@ -4,6 +4,7 @@ export const DEFAULT_SIDEBAR_HIDDEN_ENVIRONMENTS = [
LangfuseInternalTraceEnvironment.PromptExperiments,
LangfuseInternalTraceEnvironment.LLMJudge,
LangfuseInternalTraceEnvironment.CodeEval,
+ LangfuseInternalTraceEnvironment.NaturalLanguageFilter,
"langfuse-evaluation",
"sdk-experiment",
] as const;
diff --git a/web/src/features/natural-language-filters/server/router.ts b/web/src/features/natural-language-filters/server/router.ts
index 7e57f18d27..d1d6fcd8d6 100644
--- a/web/src/features/natural-language-filters/server/router.ts
+++ b/web/src/features/natural-language-filters/server/router.ts
@@ -7,8 +7,8 @@ import {
type ChatMessage,
ChatMessageType,
fetchLLMCompletion,
+ LangfuseInternalTraceEnvironment,
logger,
- type TraceSinkParams,
} from "@langfuse/shared/src/server";
import { env } from "@/src/env.mjs";
import { CreateNaturalLanguageFilterCompletion } from "./validation";
@@ -41,6 +41,36 @@ export const naturalLanguageFilterRouter = createTRPCRouter({
});
}
+ const project = await ctx.prisma.project.findUnique({
+ where: { id: input.projectId },
+ select: {
+ organization: {
+ select: {
+ aiFeaturesEnabled: true,
+ aiTelemetryEnabled: true,
+ },
+ },
+ },
+ });
+
+ if (!project) {
+ logger.warn("Project not found when resolving AI telemetry setting", {
+ projectId: input.projectId,
+ });
+ throw new TRPCError({
+ code: "NOT_FOUND",
+ message: "Project not found.",
+ });
+ }
+
+ if (!project.organization.aiFeaturesEnabled) {
+ throw new TRPCError({
+ code: "FORBIDDEN",
+ message:
+ "Natural language filtering is not enabled for this organization.",
+ });
+ }
+
if (!env.LANGFUSE_AWS_BEDROCK_MODEL) {
throw new TRPCError({
code: "PRECONDITION_FAILED",
@@ -60,23 +90,9 @@ export const naturalLanguageFilterRouter = createTRPCRouter({
});
}
- const getEnvironment = (): string => {
- switch (env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION) {
- case "US":
- case "EU":
- case "HIPAA":
- case "JP":
- return "prod";
- case "STAGING":
- return "staging";
- default:
- return "dev";
- }
- };
-
const client = getLangfuseClient(
- env.LANGFUSE_AI_FEATURES_PUBLIC_KEY as string,
- env.LANGFUSE_AI_FEATURES_SECRET_KEY as string,
+ env.LANGFUSE_AI_FEATURES_PUBLIC_KEY,
+ env.LANGFUSE_AI_FEATURES_SECRET_KEY,
env.LANGFUSE_AI_FEATURES_HOST,
false,
);
@@ -87,25 +103,34 @@ export const naturalLanguageFilterRouter = createTRPCRouter({
{ type: "chat" },
);
- if (!env.LANGFUSE_AI_FEATURES_PROJECT_ID) {
+ const aiTelemetryEnabled = project.organization.aiTelemetryEnabled;
+ const targetProjectId = aiTelemetryEnabled
+ ? env.LANGFUSE_AI_FEATURES_PROJECT_ID
+ : undefined;
+
+ if (aiTelemetryEnabled && !targetProjectId) {
throw new TRPCError({
code: "INTERNAL_SERVER_ERROR",
message: "Langfuse AI Features not configured.",
});
}
- const traceSinkParams: TraceSinkParams = {
- environment: getEnvironment(),
- traceName: "natural-language-filter",
- traceId: randomBytes(16).toString("hex"),
- targetProjectId: env.LANGFUSE_AI_FEATURES_PROJECT_ID,
- userId: ctx.session.user.id,
- metadata: {
- langfuse_user_id: ctx.session.user.id,
- langfuse_project_id: ctx.session.projectId,
- },
- prompt: promptResponse,
- };
+ const traceSinkParams = targetProjectId
+ ? {
+ environment:
+ LangfuseInternalTraceEnvironment.NaturalLanguageFilter,
+ traceName: "natural-language-filter",
+ traceId: randomBytes(16).toString("hex"),
+ targetProjectId,
+ userId: ctx.session.user.id,
+ metadata: {
+ langfuse_ai_feature: "natural-language-filter",
+ langfuse_user_id: ctx.session.user.id,
+ langfuse_project_id: ctx.session.projectId,
+ },
+ prompt: promptResponse,
+ }
+ : undefined;
// Get current datetime in ISO format with day of week for AI context
const now = new Date();
@@ -136,9 +161,11 @@ export const naturalLanguageFilterRouter = createTRPCRouter({
`LLM completion received: ${JSON.stringify(llmCompletion, null, 2)}`,
);
- const parsedFilters = parseFiltersFromCompletion(
- llmCompletion as string,
- );
+ if (typeof llmCompletion !== "string") {
+ throw new Error("Expected LLM completion to be a string");
+ }
+
+ const parsedFilters = parseFiltersFromCompletion(llmCompletion);
return {
filters: parsedFilters,
diff --git a/web/src/features/organizations/components/AIFeatureSwitch.tsx b/web/src/features/organizations/components/AIFeatureSwitch.tsx
index 5a052a6853..1fdcf6ef79 100644
--- a/web/src/features/organizations/components/AIFeatureSwitch.tsx
+++ b/web/src/features/organizations/components/AIFeatureSwitch.tsx
@@ -1,7 +1,7 @@
import { Button } from "@/src/components/ui/button";
import { Switch } from "@/src/components/ui/switch";
import { api } from "@/src/utils/api";
-import { useState } from "react";
+import { useEffect, useState } from "react";
import {
Dialog,
DialogBody,
@@ -20,21 +20,19 @@ import {
import { Card } from "@/src/components/ui/card";
import { LockIcon, ExternalLink } from "lucide-react";
import { useSession } from "next-auth/react";
-import { useForm } from "react-hook-form";
-import { zodResolver } from "@hookform/resolvers/zod";
-import * as z from "zod";
-
-const aiFeaturesSchema = z.object({
- aiFeaturesEnabled: z.boolean(),
-});
export default function AIFeatureSwitch() {
const { update: updateSession } = useSession();
const { isLangfuseCloud } = useLangfuseCloudRegion();
const capture = usePostHogClientCapture();
const organization = useQueryOrganization();
+ const aiFeaturesEnabled = organization?.aiFeaturesEnabled;
+ const aiTelemetryEnabled = organization?.aiTelemetryEnabled;
const [isAIFeatureSwitchEnabled, setIsAIFeatureSwitchEnabled] = useState(
- organization?.aiFeaturesEnabled ?? false,
+ aiFeaturesEnabled ?? false,
+ );
+ const [isAITelemetrySwitchEnabled, setIsAITelemetrySwitchEnabled] = useState(
+ aiTelemetryEnabled ?? true,
);
const [confirmOpen, setConfirmOpen] = useState(false);
const hasAccess = useHasOrganizationAccess({
@@ -42,16 +40,9 @@ export default function AIFeatureSwitch() {
scope: "organization:update",
});
- const confirmForm = useForm<z.infer<typeof aiFeaturesSchema>>({
- resolver: zodResolver(aiFeaturesSchema),
- defaultValues: {
- aiFeaturesEnabled: isAIFeatureSwitchEnabled,
- },
- });
-
const updateAIFeatures = api.organizations.update.useMutation({
- onSuccess: () => {
- void updateSession();
+ onSuccess: async () => {
+ await updateSession();
setConfirmOpen(false);
},
onError: () => {
@@ -59,13 +50,51 @@ export default function AIFeatureSwitch() {
},
});
+ const updateAITelemetry = api.organizations.update.useMutation({
+ onSuccess: async () => {
+ await updateSession();
+ },
+ onError: () => {
+ setIsAITelemetrySwitchEnabled(aiTelemetryEnabled ?? true);
+ },
+ });
+
+ useEffect(() => {
+ if (aiFeaturesEnabled === undefined || aiTelemetryEnabled === undefined) {
+ return;
+ }
+
+ if (!confirmOpen && !updateAIFeatures.isPending) {
+ setIsAIFeatureSwitchEnabled(aiFeaturesEnabled);
+ }
+
+ if (!updateAITelemetry.isPending) {
+ setIsAITelemetrySwitchEnabled(aiTelemetryEnabled);
+ }
+ }, [
+ aiFeaturesEnabled,
+ aiTelemetryEnabled,
+ confirmOpen,
+ updateAIFeatures.isPending,
+ updateAITelemetry.isPending,
+ ]);
+
function handleSwitchChange(newValue: boolean) {
if (!hasAccess) return;
setIsAIFeatureSwitchEnabled(newValue);
- confirmForm.setValue("aiFeaturesEnabled", newValue);
setConfirmOpen(true);
}
+ function handleTelemetrySwitchChange(newValue: boolean) {
+ if (!organization || !hasAccess) return;
+ setIsAITelemetrySwitchEnabled(newValue);
+ capture("organization_settings:ai_telemetry_toggle");
+ updateAITelemetry.mutate({
+ orgId: organization.id,
+ aiTelemetryEnabled: newValue,
+ });
+ }
+
function handleCancel() {
setIsAIFeatureSwitchEnabled(organization?.aiFeaturesEnabled ?? false);
setConfirmOpen(false);
@@ -121,6 +150,31 @@ export default function AIFeatureSwitch() {
)}
</div>
</div>
+ {isAIFeatureSwitchEnabled && (
+ <div className="mt-4 flex flex-row items-center justify-between border-t pt-4">
+ <div className="flex flex-col gap-1">
+ <h4 className="font-semibold">
+ AI Data Use for Product/Service Improvement
+ </h4>
+ <p className="text-sm">
+ Share data about your use of AI with Langfuse for product and
+ service improvement.
+ </p>
+ </div>
+ <div className="relative">
+ <Switch
+ checked={isAITelemetrySwitchEnabled}
+ onCheckedChange={handleTelemetrySwitchChange}
+ disabled={!hasAccess || updateAITelemetry.isPending}
+ />
+ {!hasAccess && (
+ <span title="No access">
+ <LockIcon className="text-muted absolute top-1/2 right-3 h-4 w-4 -translate-y-1/2 transform" />
+ </span>
+ )}
+ </div>
+ </div>
+ )}
</Card>
<Dialog
diff --git a/web/src/features/organizations/server/organizationRouter.ts b/web/src/features/organizations/server/organizationRouter.ts
index 1f39e9e146..77474ab69c 100644
--- a/web/src/features/organizations/server/organizationRouter.ts
+++ b/web/src/features/organizations/server/organizationRouter.ts
@@ -126,10 +126,18 @@ export const organizationsRouter = createTRPCRouter({
.extend({
orgId: z.string(),
aiFeaturesEnabled: z.boolean().optional(),
+ aiTelemetryEnabled: z.boolean().optional(),
})
- .refine((data) => data.name || data.aiFeaturesEnabled !== undefined, {
- message: "At least one of name or aiFeaturesEnabled is required",
- }),
+ .refine(
+ (data) =>
+ data.name ||
+ data.aiFeaturesEnabled !== undefined ||
+ data.aiTelemetryEnabled !== undefined,
+ {
+ message:
+ "At least one of name, aiFeaturesEnabled or aiTelemetryEnabled is required",
+ },
+ ),
)
.mutation(async ({ input, ctx }) => {
throwIfNoOrganizationAccess({
@@ -139,13 +147,13 @@ export const organizationsRouter = createTRPCRouter({
});
if (
- input.aiFeaturesEnabled !== undefined &&
+ (input.aiFeaturesEnabled !== undefined ||
+ input.aiTelemetryEnabled !== undefined) &&
!env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION
) {
throw new TRPCError({
code: "PRECONDITION_FAILED",
- message:
- "Natural language filtering is not available in self-hosted deployments.",
+ message: "AI features are not available in self-hosted deployments.",
});
}
@@ -161,6 +169,7 @@ export const organizationsRouter = createTRPCRouter({
data: {
name: input.name,
aiFeaturesEnabled: input.aiFeaturesEnabled,
+ aiTelemetryEnabled: input.aiTelemetryEnabled,
},
});
diff --git a/web/src/features/posthog-analytics/usePostHogClientCapture.ts b/web/src/features/posthog-analytics/usePostHogClientCapture.ts
index 4b91f573a9..f63143cf66 100644
--- a/web/src/features/posthog-analytics/usePostHogClientCapture.ts
+++ b/web/src/features/posthog-analytics/usePostHogClientCapture.ts
@@ -209,6 +209,7 @@ export const events = {
"pricing_dialog_opened",
"delete_organization",
"ai_features_toggle",
+ "ai_telemetry_toggle",
],
help_popup: ["opened", "href_clicked"],
navigate_detail_pages: ["button_click_prev_or_next"],
diff --git a/web/src/server/auth.ts b/web/src/server/auth.ts
index a395216562..de6a2d0533 100644
--- a/web/src/server/auth.ts
+++ b/web/src/server/auth.ts
@@ -866,6 +866,8 @@ export async function getAuthOptions(): Promise<NextAuthOptions> {
>) ?? {},
aiFeaturesEnabled:
orgMembership.organization.aiFeaturesEnabled,
+ aiTelemetryEnabled:
+ orgMembership.organization.aiTelemetryEnabled,
cloudConfig: parsedCloudConfig.data,
projects: orgMembership.organization.projects
.map((project) => {
diff --git a/web/types/next-auth.d.ts b/web/types/next-auth.d.ts
index 0bce3dbc9f..2a6c8c26ac 100644
--- a/web/types/next-auth.d.ts
+++ b/web/types/next-auth.d.ts
@@ -45,6 +45,7 @@ declare module "next-auth" {
plan: Plan;
metadata: Record<string, unknown>;
aiFeaturesEnabled: boolean;
+ aiTelemetryEnabled: boolean;
projects: {
id: PrismaProject["id"];
name: PrismaProject["name"];
diff --git a/worker/src/__tests__/thresholdProcessing.test.ts b/worker/src/__tests__/thresholdProcessing.test.ts
index 8def6a140c..2e5837f956 100644
--- a/worker/src/__tests__/thresholdProcessing.test.ts
+++ b/worker/src/__tests__/thresholdProcessing.test.ts
@@ -43,6 +43,7 @@ const createMockOrg = (
cloudCurrentCycleUsage: null,
cloudFreeTierUsageThresholdState: null,
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: false,
createdAt: new Date("2024-01-01T00:00:00Z"),
updatedAt: new Date("2024-01-01T00:00:00Z"),
...overrides,
diff --git a/worker/src/__tests__/usageThresholdCacheInvalidation.test.ts b/worker/src/__tests__/usageThresholdCacheInvalidation.test.ts
index 53bc57a6f1..395b45c11d 100644
--- a/worker/src/__tests__/usageThresholdCacheInvalidation.test.ts
+++ b/worker/src/__tests__/usageThresholdCacheInvalidation.test.ts
@@ -152,6 +152,7 @@ describe("Usage Threshold Cache Invalidation", () => {
cloudCurrentCycleUsage: 150_000, // Below blocking threshold
cloudFreeTierUsageThresholdState: null, // Not blocked yet
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: false,
createdAt: new Date("2024-01-01T00:00:00Z"),
updatedAt: new Date("2024-01-01T00:00:00Z"),
};
@@ -256,6 +257,7 @@ describe("Usage Threshold Cache Invalidation", () => {
cloudCurrentCycleUsage: 250_000,
cloudFreeTierUsageThresholdState: "BLOCKED", // Previously blocked
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: false,
createdAt: new Date("2024-01-01T00:00:00Z"),
updatedAt: new Date("2024-01-01T00:00:00Z"),
};
@@ -330,6 +332,7 @@ describe("Usage Threshold Cache Invalidation", () => {
cloudCurrentCycleUsage: 30_000,
cloudFreeTierUsageThresholdState: null,
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: false,
createdAt: new Date("2024-01-01T00:00:00Z"),
updatedAt: new Date("2024-01-01T00:00:00Z"),
};
@@ -446,6 +449,7 @@ describe("Usage Threshold Cache Invalidation", () => {
cloudCurrentCycleUsage: 150_000,
cloudFreeTierUsageThresholdState: null,
aiFeaturesEnabled: false,
+ aiTelemetryEnabled: false,
createdAt: new Date("2024-01-01T00:00:00Z"),
updatedAt: new Date("2024-01-01T00:00:00Z"),
};