From 1be51163fe78bd7bb9a252f2a12bd7e68af930cf Mon Sep 17 00:00:00 2001 From: unknown <> Date: Sat, 11 Jul 2026 17:03:40 +0000 Subject: [PATCH 1/2] docs(openrouter-analytics-query): document created_at__ time-bucket alias Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- skills/openrouter-analytics-query/SKILL.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/skills/openrouter-analytics-query/SKILL.md b/skills/openrouter-analytics-query/SKILL.md index f6b7446..5247b37 100644 --- a/skills/openrouter-analytics-query/SKILL.md +++ b/skills/openrouter-analytics-query/SKILL.md @@ -73,7 +73,7 @@ cd /scripts && npx tsx query-analytics.ts --met | `granularity` | `string` | none | Time bucketing: `minute`, `hour`, `day`, `week`, `month` | | `time_range` | `object` | last 7 days | `{ start, end }` as ISO 8601 datetime strings | | `filters` | `object[]` | `[]` | Up to 20 filter conditions | -| `order_by` | `object` | time desc (if granularity set) | `{ field, direction }` where field is a metric, dimension, or `"date"` (short-form alias — maps to `date__day`, `date__hour`, etc. based on granularity) | +| `order_by` | `object` | time desc (if granularity set) | `{ field, direction }` where field is a metric, dimension, or `"date"` (short-form alias — maps to the time-bucket column, e.g. `date__day` or `created_at__day`, based on granularity and the resolved table) | | `limit` | `integer` | 1000 | Maximum total rows to return (1–10,000). On time-series queries with dimensions and no explicit `group_limit`, the server may raise this to accommodate the expected number of time-bucket/dimension combinations. | | `group_limit` | `integer` | auto-computed | Maximum rows per distinct dimension combination (ClickHouse LIMIT n BY). When omitted on time-series queries (granularity + dimensions), auto-computed from the time range to guarantee full time-window coverage per group. Explicit values override the default. Ignored when no dimensions are specified. | | `classifier_dimensions` | `object` | none | Group by dynamic classifier-produced dimensions. See [Classifier Dimensions](#classifier-dimensions) below. | @@ -127,6 +127,7 @@ Classifier dimensions allow grouping by dynamic, user-defined classification lab - Limits the query time range to 31 days - Single dimension name → result column is aliased to that name (e.g., `category`) - Multiple dimension names → result uses generic `clf_dimension_name` / `clf_dimension_value` columns +- With `granularity` set, the time-bucket key in result rows is `created_at__` (buckets are computed from the generation's creation time) ## Classifier Filters @@ -181,7 +182,7 @@ Classifier filters narrow results to generations matching specific classificatio | Field | Description | |---|---| -| `data.data` | Array of result rows. Each row has keys for requested metrics, dimensions, and `date__` (when granularity is set). For `classifier_dimensions` queries with a single `dimension_name`, a column is aliased to that name (e.g., `category`). With multiple names or no `dimension_names`, rows include `clf_dimension_name` and `clf_dimension_value` columns. | +| `data.data` | Array of result rows. Each row has keys for requested metrics, dimensions, and a time-bucket key (when granularity is set): `date__` for most queries, or `created_at__` when the query resolves to raw generation data (31-day-limited metrics/dimensions and classifier queries). For `classifier_dimensions` queries with a single `dimension_name`, a column is aliased to that name (e.g., `category`). With multiple names or no `dimension_names`, rows include `clf_dimension_name` and `clf_dimension_value` columns. | | `data.metadata.query_time_ms` | Query execution time in milliseconds | | `data.metadata.row_count` | Number of rows returned | | `data.metadata.truncated` | `true` if results were truncated at the limit | From 9883a9976a5975935e15c663882a00c86b047d86 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 13 Jul 2026 14:04:07 +0000 Subject: [PATCH 2/2] docs(openrouter-analytics): note created_at__ time-bucket key for raw-generation queries Co-Authored-By: Joseph Ciesielski --- skills/openrouter-analytics/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skills/openrouter-analytics/SKILL.md b/skills/openrouter-analytics/SKILL.md index 96a4f4e..93c155f 100644 --- a/skills/openrouter-analytics/SKILL.md +++ b/skills/openrouter-analytics/SKILL.md @@ -126,7 +126,7 @@ When interpreting results for the user: - **Latency** (`avg_latency`, `p50_latency`, etc.) is in milliseconds - **Rates** (`cache_hit_rate`) are 0–1 ratios - **Throughput** (`avg_throughput`) is tokens per second -- When `granularity` is set, rows include a `date__` field for the time bucket (e.g., `date__day`, `date__hour`, `date__month`) +- When `granularity` is set, rows include a time-bucket field: `date__` for most queries (e.g., `date__day`), or `created_at__` when the query resolves to raw generation data (31-day-limited metrics/dimensions and classifier queries) - **Label resolution**: dimensions `api_key_id`, `app`, `user`, and `workspace` have their raw IDs replaced with human-readable names (key name, app title, user name, workspace name) directly in the data rows - **Truncation**: when consuming output programmatically, check `metadata.truncated`. If `true`, the result was capped at `--limit` and is a *partial* dataset — raise `--limit` or paginate before reporting totals or rankings