Skip to content

B2B-15 · Copilot metering: usage log, token accounting, quotas #2548

Description

@thesocialdev

Part of the B2B epic (Bloco 4 · item 4.1). Today there is zero metering/quota/token accounting on any LLM call (ai-task/ queue, copilot/copilot-chat.service.ts — GPT-5-mini via LangChain).

What

  • UsageLog collection (userId / org / namespace / feature / tokens / cost)
  • Capture usage from LangChain calls (copilot-chat.service.ts:317, ai-task.service.ts:69-78) — instrument every LLM call site
  • Quota enforcement
  • Aggregation per seat/org + billing hook

Effort: ~2–3 SP · Depends on: B2B-5, B2B-8

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions