Skip to content

feat(den): add My Usage page for every member - #7414

Merged
OmarMcAdam merged 1 commit into
devfrom
per-member-usage-page
Nov 14, 2026
Merged

OmarMcAdam merged 1 commit into
devfrom
per-member-usage-page

Conversation

@OmarMcAdam

Copy link
Copy Markdown
Member

What is this about?

A My Usage page in Den Web (Observability › My Usage) and two new sections in the desktop app's Settings › Usage, where any member sees their own AI Gateway usage. Closes #7390.

What problem does it solve?

Members couldn't answer "how much have I used, how close am I to my limit, and which model is cheaper for what I do?" without asking an admin.

What was the situation before?

Den Web had no member view of usage; the Observability section was hidden for most members. The desktop Usage settings only showed limit buckets, with no spend history and no prices.

How is this implemented?

  • GET /v1/gateway/usage/me (ee/apps/den-api/src/routes/org/gateway-usage.ts): orgMemberRoute(), audited gateway_usage.read_own. Reuses readGatewayUsage with the caller's membership forced, plus their token mix and usable models with listed prices. Only days is accepted.
  • @openwork/types/den/gateway-member-usage: response schema, metrics, cost comparison (token mix × price, cache and context tiers) and the limit copy, shared by Den Web and the desktop.
  • Den Web: dashboard/my-usage with Spend limits (incl. ask for more), Past 30 days (stat strip, daily chart, per model) and Models you can use.
  • Desktop: gateway-member-usage-section.tsx under the limits; hidden when an older Den answers 404.
  • Public doc packages/docs/ai-gateway/my-usage.mdx.

Not behind a feature flag, by request.

What else changed?

  • Desktop limit-copy helpers in gateway-usage-state.ts now re-export the shared module.

Release note

Every member can now see their own AI Gateway spend limits, past 30 days of usage, and what each model they can use would cost them, under My Usage.

Evidence

evals/proofs/member-usage-page.proof.test.ts: a regular member opens Observability › My Usage and sees their $4.08 of $20.00 limit, 30-day totals matching their seeded requests, the chart switching cost/tokens, priced usable models with estimates, and none of a teammate's usage. Also test/api/gateway-usage-me.api.test.ts and my-usage-data.test.ts.

My Usage

Design: P1, P5, S1, S6, C5, C6

Members see their own AI Gateway spend limits, past 30 days of usage by
model, and what each model they can use would have cost them, in Den Web
(Observability › My Usage) and in the desktop Usage settings.

- den-api: GET /v1/gateway/usage/me, scoped to the caller, audited as
  gateway_usage.read_own; reuses the admin usage report and adds the
  member's token mix and usable models with listed prices.
- @openwork/types/den/gateway-member-usage: shared figures, cost
  comparison and limit copy for Den Web and the desktop.

Closes #7390
@mintlify

mintlify Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Status Preview Updated
differentai 🟢 Ready View Preview Nov 14, 2026, 12:57 AM

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

@vercel

vercel Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Nov 14, 2026 12:58am UTC
openwork-den Ready Ready Preview Nov 14, 2026 12:58am UTC
openwork-diagnostics Error Error Nov 14, 2026 12:58am UTC
openwork-landing Ready Ready Preview, v0 Nov 14, 2026 12:58am UTC

Request Review

This branch had an error being deployed

1 failed and 4 active deployments
Preview – openwork-den — 29cc2627 Deployed Nov 14, 2026 by vercel[bot]
staging - packages/docs — 29cc2627 Deployed Nov 14, 2026 by mintlify[bot]
Preview – openwork-app — 29cc2627 Deployed Nov 14, 2026 by vercel[bot]
Preview – openwork-landing — 29cc2627 Deployed Nov 14, 2026 by vercel[bot]
Preview – openwork-diagnostics — 29cc2627 Deployed Nov 14, 2026 by vercel[bot]
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.

[Feature]: "My Usage" page in den-web: spend limits, 30-day usage and a model cost comparison for every member

1 participant