dev.cocore.compute.modelActivity
Aggregate receipt activity per model and per time window. Walks the most-recent indexed receipts (capped at 5000), groups by `body.model`, and tallies requests + tokens across the hour/day/week/month windows, with per-provider breakdowns. The scan cap is reported back as `scanned`/`scanLimit`/`truncated` so consumers can tell an exact total from a lower bound; `oldestScannedAt` is the earliest receipt that contributed to any window.
Details · query
| Kind | query |
|---|---|
| Authority | compute.cocore.dev |
| Indexed |
Checks
Validunlimited-stringdefs.main.output.schema.properties.models.items.properties.modelIdNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Aggregate receipt activity per model and per time window. Walks the most-recent indexed receipts (capped at 5000), groups by `body.model`, and tallies requests + tokens across the hour/day/week/month windows, with per-provider breakdowns. The scan cap is reported back as `scanned`/`scanLimit`/`truncated` so consumers can tell an exact total from a lower bound; `oldestScannedAt` is the earliest receipt that contributed to any window.",
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"generatedAt": {
"format": "datetime",
"type": "string"
},
"models": {
"items": {
"properties": {
"byProvider": {
"items": {
"properties": {
"did": {
"format": "did",
"type": "string"
},
"stats": {
"ref": "dev.cocore.defs#activityWindows",
"type": "ref"
}
},
"required": [
"did",
"stats"
],
"type": "object"
},
"type": "array"
},
"modelId": {
"type": "string"
},
"totals": {
"ref": "dev.cocore.defs#activityWindows",
"type": "ref"
}
},
"required": [
"modelId",
"totals",
"byProvider"
],
"type": "object"
},
"type": "array"
},
"oldestScannedAt": {
"description": "Earliest receipt timestamp that contributed to any window, so a consumer can state the coverage of the counts. Absent when nothing counted.",
"format": "datetime",
"type": "string"
},
"scanLimit": {
"description": "Cap the scan applied (receipts are walked newest-first).",
"type": "integer"
},
"scanned": {
"description": "Number of indexed receipts this scan walked.",
"type": "integer"
},
"truncated": {
"description": "True when the scan filled its cap, so older receipts exist that these totals do not include. The wider windows (week/month) are then lower bounds.",
"type": "boolean"
}
},
"required": [
"generatedAt",
"models"
],
"type": "object"
}
},
"type": "query"
}
},
"id": "dev.cocore.compute.modelActivity",
"lexicon": 1
}