Skip to content

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

fix(evals): stop offering new trace-level evals to v4-toggle cohort on Cloud (#14924)

marliessophief503aa0a0ab7
diff --git a/web/src/features/evals/hooks/useEvalCapabilities.ts b/web/src/features/evals/hooks/useEvalCapabilities.ts
index 7b32e62495..9475af37f6 100644
--- a/web/src/features/evals/hooks/useEvalCapabilities.ts
+++ b/web/src/features/evals/hooks/useEvalCapabilities.ts
@@ -49,27 +49,24 @@ export function useEvalCapabilities(
const hasLegacyEvals = (evalCounts.data?.legacyConfigCount ?? 0) > 0;
// The legacy eval experience depends on whether the deployment still writes
- // the legacy tables and on the user's rollout cohort. Use === true / explicit
- // mode checks so we default to hidden while the session is loading, which
- // prevents a flash of legacy options.
+ // the legacy tables. Use explicit mode checks so we default to hidden while
+ // the session is loading, which prevents a flash of legacy options.
const { isLangfuseCloud } = useLangfuseCloudRegion();
- const canToggleV4 = session?.user?.canToggleV4 === true;
const v4WriteMode = session?.environment?.v4WriteMode;
// Whether a *new* config may use the legacy experience (independent of
// hasLegacyEvals, which always keeps legacy visible so existing legacy
// evaluators stay manageable):
// - events_only: legacy tables are no longer written → no new legacy evals.
- // - dual: self-hosted deployments always allow legacy; on Cloud only cohorts
- // that can still toggle V4 (orgs created before the rollout cutoff).
+ // - dual: self-hosted deployments always allow legacy; on Cloud, new legacy
+ // evals are only available via hasLegacyEvals (projects that already have
+ // legacy evaluators) — being able to toggle V4 is not enough.
// - legacy: legacy is the only experience.
const modeAllowsNewLegacy =
v4WriteMode === "events_only"
? false
: v4WriteMode === "dual"
- ? isLangfuseCloud
- ? canToggleV4
- : true
+ ? !isLangfuseCloud
: v4WriteMode === "legacy"; // legacy → true; undefined (loading) → false
return {