Skip to content

docs: document embedded-user AI billing and correct SCIM audit log events - #11535

Open
keydunov wants to merge 1 commit into
masterfrom
claude/gallant-ramanujan-f9x7v5
Open

docs: document embedded-user AI billing and correct SCIM audit log events#11535
keydunov wants to merge 1 commit into
masterfrom
claude/gallant-ramanujan-f9x7v5

Conversation

@keydunov

Copy link
Copy Markdown
Member

Summary

Found while cross-checking recent cubejs-enterprise changes against docs-mintlify for undocumented customer-facing behavior.

  • AI Tokens (admin/account-billing/ai-tokens.mdx): as of CUB-3784, embedded end users (Analytics Chat, Creator Mode, embedded dashboards) — who aren't billed as seats — have their AI token spend routed to its own set of usage dimensions with no per-seat grant coverage. It now draws from token packages / on-demand overage instead. Added an "Embedded users" section so admins aren't surprised by embedded usage appearing as overage on their bill.
  • Audit Log (admin/monitoring/audit-log.mdx): a SCIM group write used to log one generic Updated group via SCIM event regardless of what changed. Membership changes now emit specific titles (Added group members via SCIM, Removed group members via SCIM, Updated group membership via SCIM). Added the three new event names to the event types table.

Both are small, additive edits to existing pages — no new pages, no nav changes.

Test plan

  • Verified both behaviors against the cubejs-enterprise commits that introduced them (2a1f5072 billing dimension routing, 9bf3b548 SCIM audit log titles)
  • Confirmed neither was already covered elsewhere in docs-mintlify
  • Mintlify preview render (no local dev server run in this session)

🤖 Generated with Claude Code

https://claude.ai/code/session_01AxYWsCS56fWz5N1P3n4Znn


Generated by Claude Code

…ents

- AI Tokens: embedded users (Analytics Chat, Creator Mode, embedded
  dashboards) aren't billed as seats, so as of CUB-3784 their AI token
  spend is no longer covered by per-seat grants — it draws from token
  packages / on-demand overage instead. Document this so admins aren't
  surprised by embedded usage showing up as overage on their bill.
- Audit Log: SCIM group writes used to log a single generic
  "Updated group via SCIM" event. Membership changes now get specific
  titles (Added/Removed/Updated group membership via SCIM); add the
  three new event names to the event types table.
@mintlify

mintlify Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cubed3 🟢 Ready View Preview Aug 12, 2026, 12:23 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@claude

claude Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Claude finished @keydunov's task in 1m 18s —— View job


Review: 1 blocking, 2 accuracy questions

Docs-only, additive, well-scoped. One broken internal link needs fixing before merge; two claims in the new section contradict or extend what the rest of the page says and should be verified against the billing code. The audit-log change looks clean.

Full review — findings, verification notes, and checklist

Todos

  • Read PR diff against origin/master
  • Verify internal links and anchors in ai-tokens.mdx
  • Cross-check new section against the rest of the page for contradictions
  • Check audit-log.mdx table edit for format/consistency
  • Check repo docs conventions (docs-mintlify/CLAUDE.md)
  • Post inline comments and summary

Findings

1. Broken internal link — /embedding/iframe (docs-mintlify/admin/account-billing/ai-tokens.mdx:78)

docs-mintlify/embedding/iframe/ contains no index.mdx, the path is absent from docs.json nav (only the leaf pages embedding/iframe/dashboards, .../analytics-chat, .../creator-mode, … are registered), and no redirect maps it. Mintlify will 404. Every other doc links to /embedding for the general case. Suggested fix posted inline.

2. Free-tier bullet contradicts the Free tier section (:88)

New text: "embedded users share the account's free tier allowance". Existing text at :73: "Each user on a free plan receives an individual monthly token allowance." Per-user vs. shared account pool — one of the two is wrong. Needs a check against the billing implementation.

3. Contract-customer overage is an unsupported extension (:83-84)

"draws from token packages first, then continues as on-demand overage" attaches on-demand billing to contract customers, but the page's On-demand consumption section is scoped under Per-seat token grants and says billing goes "through the credit card on file" — not the usual contract-customer path. If true, it belongs in Token packages as well, since it applies to non-embedded usage too.

Not issues / verified clean

  • All four anchor links (#per-seat-token-grants, #token-packages, #on-demand-consumption, #free-tier) resolve to real headings on the page.
  • audit-log.mdx: three new event names use the same <br/>-separated cell format as the rest of the table, and the pre-existing generic Updated group via SCIM is correctly retained alongside the new specific titles (per the PR description, non-membership group writes still emit it).
  • Terminology matches docs-mintlify/CLAUDE.md: "on-demand customers" / "contract customers" for billing segments, "Analytics Chat" / "Creator Mode" capitalized per taxonomy, "embedded" not "iFrame-based".
  • Placement of the new H2 between Free tier and Tracking usage is sensible; section is appropriately short with no padding.

Not verified

The underlying behavior claims (2a1f5072 billing dimension routing, 9bf3b548 SCIM audit titles) live in the private cubejs-enterprise repo, which isn't reachable from this checkout — findings 2 and 3 are flagged from internal consistency alone, not from reading the source. No Mintlify dev server was run.

· branch [`claude/gallant-ramanujan-f9x7v5`](https://github.com/cube-js/cube/tree/claude/gallant-ramanujan-f9x7v5)


## Embedded users

AI token spend by [embedded](/embedding/iframe) end users — through Analytics

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Broken internal link. /embedding/iframe isn't a page — docs-mintlify/embedding/iframe/ has no index.mdx, the path isn't in docs.json nav, and there's no redirect for it (only /embedding/private-embedding, /embedding/signed-embedding, /embedding/creator-mode). Every other page links either to /embedding (the group index) or to a concrete leaf like /embedding/iframe/dashboards.

Since the sentence covers Analytics Chat, Creator Mode, and dashboards, /embedding is the right target:

Suggested change
AI token spend by [embedded](/embedding/iframe) end users — through Analytics
AI token spend by [embedded](/embedding) end users — through Analytics

- **On-demand customers**: embedded AI spend is billed directly as [on-demand
consumption](#on-demand-consumption), subject to the account's on-demand
spending limit if one is set.
- **Free plan**: embedded users share the account's [free tier](#free-tier)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This contradicts the Free tier section three lines above, which says the allowance is per user ("Each user on a free plan receives an individual monthly token allowance"), not an account-level pool. "share the account's free tier allowance" tells a reader there's one shared bucket.

Worth confirming against the billing code which of the two is actually true, then making both sections agree. If the grant really is per-user, something like "embedded users draw from the free tier allowance" (dropping "the account's" and "share") avoids implying a pool.

Comment on lines +83 to +84
- **Contract customers**: embedded AI spend draws from [token
packages](#token-packages) first, then continues as on-demand overage.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit / accuracy check: "then continues as on-demand overage" links contract customers to a mechanism the page frames as on-demand-plan-only — On-demand consumption is nested under Per-seat token grants and says usage "is billed through the credit card on file", which typically isn't how contract customers pay.

If contract overage is real, it's a notable billing fact that deserves a sentence in the Token packages section too (what happens when the pool runs dry applies to non-embedded usage as well). If it isn't, this bullet should say spend is blocked / requires another package instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants