langfuse/langfuse · warning

This feature is not available on your current plan.

Error message

This feature is not available on your current plan.

What it means

HTTP 403 plan-gating response: the self-hosted instance's current plan (getSelfHostedInstancePlanServerSide) lacks the 'admin-api' entitlement, so the operation is refused before parameter validation. This is Langfuse's plan-based feature gate on the admin API surface.

Source

Thrown at web/src/pages/api/admin/organizations/[organizationId]/apiKeys/[apiKeyId].ts:33

) {
  try {
    if (req.method !== "DELETE") {
      res.status(405).json({ error: "Method Not Allowed" });
      return;
    }

    // Verify admin API authentication, only allow on self-hosted (not on Langfuse Cloud)
    if (!AdminApiAuthService.handleAdminAuth(req, res)) {
      return;
    }

    if (
      !hasEntitlementBasedOnPlan({
        plan: getSelfHostedInstancePlanServerSide(),
        entitlement: "admin-api",
      })
    ) {
      return res.status(403).json({
        error: "This feature is not available on your current plan.",
      });
    }

    const params = validateQueryParams(req.query);
    if (!params) {
      return res.status(400).json({ error: "Invalid request parameters" });
    }

    const { organizationId, apiKeyId } = params;

    // Check if organization exists
    const organization = await prisma.organization.findUnique({
      where: { id: organizationId },
    });

    if (!organization) {
      return res.status(404).json({ error: "Organization not found" });

View on GitHub (pinned to 59d92c7cf3)

Solutions

  1. Set a valid enterprise license/configuration so the plan resolves to one with the admin-api entitlement
  2. Or stop using admin API endpoints on plans without the entitlement; manage keys via the standard project endpoints
  3. Verify getSelfHostedInstancePlanServerSide resolves the expected plan (check env/license configuration)
Defensive patterns

Strategy: fallback

Validate before calling

const plan = await getInstancePlan();
if (!hasEntitlement(plan, 'admin-api')) useProjectScopedApiKeysInstead();

Type guard

const hasAdminApiEntitlement = (plan: string): boolean => ADMIN_API_PLANS.has(plan);

Try / catch

try { await adminDelete(); } catch (e) { if (e.status === 403) fallbackToProjectKeyManagement(); else throw e; }

Prevention

When it happens

Trigger: Self-hosted instance running on the free/oss plan (no enterprise license or EE features enabled) hitting the organization API key admin endpoint.

Common situations: Self-hosting without an enterprise license key; LICENSE_KEY env var missing or invalid after redeploy; expecting OSS build to include admin API features gated to enterprise.

Related errors


AI-assisted analysis of langfuse/langfuse@59d92c7cf3 (2026-08-27). Data as JSON: /api/errors/4b24200357c24abd. Report an issue: GitHub.