Problem/Motivation
The AI Usage Log at /admin/reports/ai-metering/log shows every recorded operation with no way to narrow the list. Finding records for a specific provider or model requires scrolling the full log or exporting and filtering offline.
Steps to reproduce
- Navigate to
/admin/reports/ai-metering/log. - Try to filter by provider or model.
Environment
- Drupal version: 10.x / 11.x
- ai_metering version: 1.0.0-alpha1
- AI provider module + version (e.g. ai_provider_anthropic 1.x): any
- AI feature module tested (e.g. ai_translate, ai_chatbot, ai_assistant_api, ai_summarize...): any
Proposed resolution
Add three exposed select-list filters to the ai_usage_log view: Provider, Model, and Period (combined Month/Year). Options for provider and model are populated dynamically from values already present in the log. The period filter defaults to the last 3 months.
Remaining tasks
- Create custom Views filter plugins for provider, model, and period.
- Register the filters in
hook_views_data()and update the view config. - Add a kernel test per filter.
User interface changes
The usage log page gains a filter form above the table.
API changes
N/A
Data model changes
N/A
AI assistance
Issue summary drafted with AI. Reviewed and approved by @codeitwisely.
Comments
Comment #15
codeitwisely commented