# OpenMeter caps tokens per customer at the cost of three more systems

> Self-hosted releases are still labelled beta, so ask who answers the 2am page when ClickHouse fills its disk before drawing the architecture.

Original: https://fdetimes.net/en/tools/openmeter-per-customer-token-limits/

The README for OpenMeter, the open-source tool in the openmeterio/openmeter repository, reduces its purpose to four jobs: metering usage, controlling access, billing customers and keeping the infrastructure in your hands.

The first two go straight to a question every FDE deploying an LLM application for multiple customers eventually faces: how many tokens has customer A used, and when should they be cut off?

OpenMeter answers both in a single system. Kong acquired OpenMeter on September 3, 2025 and committed to keeping the project open source under the Apache 2.0 license.

The price is a fairly heavy data stack to operate, running on software whose releases are still labeled beta. Understanding both costs before recommending it to a client will spare you most of the trouble later.

## When to use it, and when to wait

OpenMeter fits one case best: an AI platform serving many tenants, each with its own token allowance, where usage data must stay on the client's infrastructure. A self-hosted core consists of OpenMeter's two processes, the API and the worker, running alongside Kafka, ClickHouse and PostgreSQL.

That list is the first filter. If the client's operations team has never run Kafka or ClickHouse, you are proposing three more systems for them to be on call for. In customer discovery, ask directly who will answer the phone at 2am when ClickHouse runs out of disk, and only then draw the architecture.

## A minimal token meter

The official guide for AI tokens is short: define the meter with a `SUM` aggregation and send the token count in the `tokens` property of the event data.

Because each model is priced differently, the documentation recommends adding the prompt's `provider`, `model` and `type` to the group-by. At the end of the month you can then separate input and output tokens for each model and multiply them by the matching unit price.

The ID is where things go wrong. OpenMeter deduplicates events on the pair of `id` and `source`, so the ID must be unique and must stay the same when an event is resent. Below is a sketch of the fields that matter, not the full schema:

```text
id:     <request ID of the LLM call>
source: <name of the service sending the event>
data:   tokens, provider, model, type
```

Take a gateway that calls a model and gets back 1,200 tokens. It sends the event, times out and sends it again. If each attempt generates a fresh UUID, the customer is billed for 2,400 tokens.

If the request ID is used as the `id`, the second send is discarded and the count stays at 1,200. This is an error the client will spot on their own when they reconcile against the provider's invoice.

## Hard limits are not absolute

To limit each customer's usage, OpenMeter uses metered entitlements. The allowance lives in grants. Each grant is a record that gives a specific customer an amount of usage, and it can be configured with a priority, an expiry date, rollover of the balance into the next period and automatic recurrence.

In the quickstart example, setting `isSoftLimit: false` means the customer is denied access once the balance reaches zero.

OpenMeter does not block requests for you. The API returns the entitlement value with a required `hasAccess` field, and your own application must read that field to let the request through or stop it. Enforcement therefore still sits in the gateway code you write.

The entitlement documentation describes the current value as real time. Yet a post on the OpenMeter blog by Lior Mechlovich says the balance can take a few seconds to reflect the latest events. For a tenant firing hundreds of parallel calls, those few seconds are enough to go slightly over the limit.

**Key point:** A limit only stops users when your own application reads it and respects it.

In practice, tell the client plainly that limits carry a small margin of error, and keep a buffer below the cutoff. If the client's contract demands token-exact enforcement, you need an additional local counter at the gateway.

## What to tell the client up front

The README states openly that releases are still beta and may contain breaking changes. The official Helm chart for Kubernetes is written for development environments, not production.

The release notes also carry a line anyone self-hosting should record: when upgrading, do not skip v1.0.0-beta.240. That release came out on November 27, and the latest, beta.241, on November 29, 2026. Pin your versions, keep a staging environment and read the release notes before every upgrade.

None of this makes OpenMeter useless. It simply means the production Kubernetes manifests will be written, and owned, by you or the client. Put that in the handover documentation in the first week rather than letting the client discover it once they are already running it.

## What to learn first

Before touching OpenMeter, get solid on three things: idempotency in event pipelines, Kafka's at-least-once message delivery, and how ClickHouse aggregates figures. When a client asks why two numbers disagree, those are the places you will have to look.

If you have done this kind of work, put it on your CV in concrete technical terms rather than a generic keyword. A line such as "built per-tenant token metering, with events made idempotent by request ID and access blocked by quota" shows an interviewer that you understand both the data and the client's money.

In the end, a wrong token count shows up on the client's invoice before it shows up on your dashboard. Choose your event IDs with more care than you choose the tool.

**Try this week:**

- Take one day of logs from the LLM application you are working on and total tokens by provider and model pair, to see which dimensions your meter needs to group by
- Check whether your gateway resends requests on timeout; if it does, see whether the resend keeps the same ID as the first attempt
- Read OpenMeter's release notes from v1.0.0-beta.240 onward before recommending the tool to any client

## Sources

- [Kong Acquires OpenMeter (Kong blog)](https://konghq.com/blog/news/kong-acquires-openmeter)

- [OpenMeter README (openmeterio/openmeter)](https://raw.githubusercontent.com/openmeterio/openmeter/main/README.md)

- [Releases · openmeterio/openmeter](https://github.com/openmeterio/openmeter/releases)

- [Common Examples (OpenMeter Docs)](https://openmeter.io/docs/metering/guides/common-examples)

- [Best Practices (OpenMeter Docs)](https://openmeter.io/docs/metering/guides/best-practices)

- [Entitlement (OpenMeter Docs)](https://openmeter.io/docs/billing/entitlements/entitlement)

- [Get Started (OpenMeter Entitlements Docs)](https://openmeter.io/docs/billing/entitlements/quickstart)

- [Enforce Usage Limits Where the Usage Happens (OpenMeter blog, Lior Mechlovich)](https://openmeter.io/blog/enforce-limits-where-usage-happens)

- [Grant (OpenMeter Docs)](https://openmeter.io/docs/billing/entitlements/grant)
