AI Metering 1.0 Adds Cost Tracking and Quota Controls to Drupal AI
The stable 1.0 line of AI Metering gives Drupal sites a way to track token usage, estimated costs, and monthly quotas across AI operations. Drupal developer Jérôme Tchania highlighted the milestone in a LinkedIn post after developing the module to make AI spending more visible inside Drupal. Drupal.org records 1.0.0 as the first stable release on 3 August 2026, followed by version 1.0.2 on 14 August.
Jérôme said the project began while he was testing Drupal AI translation with a $20 Anthropic API balance and found no direct way inside Drupal to see what individual operations were costing. AI Metering subscribes to the Drupal AI module's event system and records calls through registered providers without requiring separate metering configuration for each provider. It tracks tokens, estimated cost, latency, and the Drupal feature responsible for a call, with reporting through dashboards by user and role and through filterable per-call logs. Pricing can come from LiteLLM and models.dev, with manual overrides and several display currencies.
Monthly quotas allow administrators to check a user's allowance before contacting a remote AI provider. Requests that exceed the configured limit can be redirected to a local provider such as Ollama or blocked before the remote request is made. The module also provides personal usage views, CSV and JSON exports, monthly rollups, and email or webhook alerts. Usage data is purged when an account is deleted and can be reassigned to Drupal's anonymous account when an account is cancelled with its content retained.
Jérôme first demonstrated an early version at a Drupal Montreal meetup in May and later presented it to the Drupal AI Learners Club, saying feedback from both sessions influenced development. He also credited issue reports from Marcus Johansson and Michael Anello with improving the beta. Jérôme said Carlos Ospina, now a co-maintainer, led the security review that preceded security advisory coverage. Drupal.org confirms that stable AI Metering releases are covered by Drupal's security advisory policy.
Version 1.0.2 corrected several problems affecting metering, quota enforcement, and advertised routing behaviour. Streamed calls could previously be recorded twice, doubling recorded token usage and estimated cost and consuming quota at twice the actual rate. Cached tokens from OpenAI and Gemini were also charged twice in estimated-cost calculations, although stored token counts and quota consumption were unaffected. The release added a separately configurable monthly token ceiling for anonymous requests, which had previously bypassed quota enforcement.
The release also deprecated an advertised two-tier model-routing path that had not been invoked by the module, removing configuration options that did not affect routing. AI Metering supports Drupal 10.5 or later within Drupal 10 and Drupal 11.2 or later, and requires PHP 8.2 or later, with PHP 8.3 or later on Drupal 11.
The project also overlaps with AI Usage Limits and AI Budget Control. An open issue discusses coordination among the maintainers and possible consolidation around a common approach to Drupal AI usage governance. No consolidation decision has been made.


