Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/models/llm_usage.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# regardless of outcome so users see the true cost of AI features
# including failed calls.
class LlmUsage < ApplicationRecord
# Usage rows are subject to retention pruning, so aggregate stats in the UI
# must cover a bounded window rather than all time — all-time totals would
# silently shrink as old rows expire.
# Aggregate stats use a bounded window so recent usage remains useful even if
# a retention policy is introduced later.
STATS_PERIOD = 30.days

belongs_to :user
Expand Down