AletheiaFact / AletheiaFact/aletheia

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

Đang mở
#2,548 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
backlog server
Ngôn ngữ chính
TypeScript
Star
55
Fork
20
Merge trung bình
2 ngày 6 giờ
Pull request đã merge (30 ngày)
2

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start by reading the LLM call sites named in copilot/copilot-chat.service.ts:317 and ai-task.service.ts:69-78, then map the remaining call sites and review the B2B-5 and B2B-8 dependencies. Done means usage is captured for every LLM call, UsageLog records exist, quotas are enforced, and seat/org aggregation plus the billing hook are covered.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript
Lĩnh vực
backend-api-design
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.