Repository navigation
fix: count unpriced AI model usage by when it was recorded - #31751
Merged
Merged
Conversation
ssncferreira
force-pushed
the
ssncf/unpriced-models-query
branch
from
November 4, 2026 12:43
9135e59 to
377dbe2
Compare
ssncferreira
force-pushed
the
ssncf/unpriced-models-query
branch
12 times, most recently
from
November 6, 2026 15:46
e95f0f0 to
b5ea285
Compare
ssncferreira
marked this pull request as ready for review
November 6, 2026 16:48
ssncferreira
requested review from
SasSwart,
ibetitsmike and
johnstcn
as code owners
November 6, 2026 16:48
ssncferreira
force-pushed
the
ssncf/unpriced-models-query
branch
from
November 11, 2026 12:53
b5ea285 to
cb33a9e
Compare
ssncferreira
force-pushed
the
ssncf/unpriced-models-query
branch
from
November 12, 2026 10:20
cb33a9e to
f0275a1
Compare
ssncferreira
force-pushed
the
ssncf/unpriced-models-query
branch
from
November 13, 2026 10:58
f0275a1 to
ddd804f
Compare
ssncferreira
force-pushed
the
ssncf/unpriced-models-query
branch
from
November 13, 2026 12:17
ddd804f to
610a969
Compare
SasSwart
approved these changes
Nov 13, 2026
ssncferreira
temporarily deployed
to
docs-preview
November 13, 2026 13:21 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updates the unpriced AI models query behind the weekly owner notification to count token usage by when it was recorded (
token_usages.created_at) in a[period_start, period_end)window, consistent with the other AI spend queries. It also returns one row per provider name and model instead of per provider type, so the unpriced models endpoint later in this stack can reuse it. The notification payload keeps the same format.Changes
GetUnpricedAIModelsSincetoGetUnpricedAIModels. It usedinterceptions.started_atwith no end.cost_micros IS NULL AND priced_model IS NULL), so usage whose price was found but whose cost could not be computed is not reported.Related to AIGOV-730
Note
Generated by Coder Agents on behalf of @ssncferreira.