Skip to content

v1.6.0 — Cost page goes fully live

Choose a tag to compare

@whchoi98 whchoi98 released this 04 Jul 13:32
· 96 commits to main since this release

Cost page goes fully live — RBAC group cost with real names, per-user tokens without CSV, spend limits, and date-range accuracy fixes. (Deployed to production 2026-07-03/04.)

Added

  • Cost by Group card. The upstream Analytics API now supports group_by[]=rbac_group_id (shipped ~2026-07, announced via blog only), so the Cost page renders per-group spend natively via the new GET /api/cost/groups. Group labels are real names (Engineering, CXO, …) resolved through the documented Compliance groups endpoint (GET /v1/compliance/groups, 1-hour cache — each listing emits a group_list_viewed audit event) with grp-<id suffix> fallback. Upstream semantics are any-membership: a multi-group user counts fully in each group, so group rows can sum above the org total (the subtitle says so).
  • Automatic group mapping. When no admin email,group CSV is uploaded, GET /api/groups now auto-derives the sidebar group scope from live user_cost_report × rbac_group_id (each user → their max-spend group, real names) — source:"auto". An uploaded CSV still wins.
  • Live per-user token tables. New GET /api/cost/user-tokens proxies the new upstream user_usage_report, so the Input/Total/Output token Top-10 tables now follow the selected date range live — the Spend Report CSV is no longer required for per-user tokens (fallback only).
  • Spend Limits (Monthly) card. New GET /api/cost/spend-limits proxies the new Spend Limits API (/v1/organizations/spend_limits/effective): per-member month-to-date spend, effective limit, utilization (highlighted at ≥90%), and limit source (user override / seat tier / RBAC group / org). Independent of the page date range; resets on the 1st (UTC).
  • Compliance key fallback. The server now falls back to the Analytics key for /api/compliance/* when no dedicated Compliance key is configured — the provisioned Analytics key carries the compliance read scopes (officially combinable per the new admin-api-keys docs). /api/health reports compliance / analytics-fallback / none.

Fixed

  • Date-range accuracy on the Cost page. The per-user sections (estimated-cost Top 10, per-user × model chart) covered 3 fewer days than the headline KPIs, and a fully-recent range made them vanish: the server still clamped user_cost_report to today−3 even though the upstream cost family now serves the finalization buffer with partial data (watermark model, verified live), and the one-sided clamp could invert the window into an upstream 400. Windows are now resolved by resolveUserCostWindow (ending ≤ today, never inverted); the Top-10 cost table sources the full-range /api/cost/users; /api/cost/efficiency deliberately stays today−3-aligned so its spend÷productivity ratios ($/LOC, score) don't mix windows. Also fixed the default cost window being 32 days — one day over the (newly documented) 31-day upstream span cap — which broke date-less chatbot cost questions.
  • Upstream RBAC flap resilience. The rbac_group_id dimension intermittently returns 503 ("Team membership data is not ready yet"). The group endpoints now keep last-good responses (served with stale: true) and the Cost page shows an explanatory note instead of silently dropping the card.

Changed

  • CSV demoted to fallback. With live per-user spend and tokens, the Spend Report CSV now covers only >31-day reconciliation windows and live-report outages; captions above the Top tables state exactly which source and period each table reflects.