Read AI usage and cost reports
Open LLM usage in Account administration with admin.ai.usage.read. Model or provider editing permission is not required. The page covers only the active tenant. The default period is the last 30 days.
Filter by user, provider, model, reasoning, source, status, and period. Group by model/reasoning or user/reasoning. See quota accounting to distinguish personal allowance from provider cost.
What the ledger counts
The ledger starts before an external request. Completion and accounting by tool call ID are idempotent. Preparing a tool is not execution. A started tool that fails still counts as execution. Provider failure, Stop, and lost usage retain distinct states.
Deleting a chat does not delete consumption. Permanent user deletion anonymizes actor, mailbox subject, and correlation identifiers. The ledger stores permitted counters, not prompts, generated answers, or tool payloads.
Costs and exchange rates
Each request records administrator-maintained catalog prices. Ordinary input, cache read, short cache write, one-hour cache write, and output are separate costs. Reasoning is part of output. Long-context multipliers apply to the complete request.
The daily USD/HUF rate comes from Frankfurter. The Europe/Budapest day uses a shared database cache and advisory lock across BFF and backend. The supplied rate date can differ on weekends or holidays. The application retains requested date, rate date, and fetch time. Requests have a short timeout.
Missing usage, prices, or exchange rates make affected totals unknown. USD cost can remain known when exchange-rate retrieval fails. The dashboard shows known subtotals and incomplete request counts. Pre-ledger calls receive no invented historical price or cost.
Decimal arithmetic preserves calculation precision. The browser rounds only for display. There is no retrospective recalculation job or interface. Catalog edits do not rewrite earlier costs.
API and operations
GET /api/admin/llm-usage uses the authenticated tenant, not a client-selected tenant. It returns summary, daily trend, grouped results, paginated requests/tools, and tenant-scoped filter options. from is inclusive. to is exclusive. pageSize is at most 100.
Existing databases need DB_Lib/Sql/20260924_llm_usage.sql and DB_Lib/Sql/20260924_llm_provider_name.sql, aligned EF/Prisma schemas, and generated clients in both applications. Provider names remain as snapshots. Older unnamed rows display provider type. Usage storage is separate from email conversations.
Lost Complexity heartbeat recovery closes the run under a lock. Recovering unfinished invocations does not start new inference. It records incomplete/interrupted accounting. Backend maintenance also settles records left open longer than provider timeout.