Skip to content

feat: add provider cost attribution#638

Open
RWDai wants to merge 10 commits into
fawney19:mainfrom
RWDai:feature/provider-cost-attribution
Open

feat: add provider cost attribution#638
RWDai wants to merge 10 commits into
fawney19:mainfrom
RWDai:feature/provider-cost-attribution

Conversation

@RWDai

@RWDai RWDai commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add provider_id/provider_name filters to usage aggregation repositories
  • add GET /api/admin/usage/attribution with provider-scoped user attribution, selected metric sorting, share calculation, and Others bucket
  • add Cost Analysis provider attribution UI and frontend API contract coverage
  • fix review-blocking edge cases for legacy provider-name attribution and unbounded internal attribution totals before visible-limit sorting

Closes #637

Verification

  • cargo fmt --all -- --check
  • BINDGEN_EXTRA_CLANG_ARGS=-isystem/usr/lib/gcc/x86_64-linux-gnu/13/include cargo test -p aether-gateway usage_attribution
  • npm run test:run -- src/api/tests/usage-contract.spec.ts
  • npm run type-check

Note: local Rust tests require BINDGEN_EXTRA_CLANG_ARGS because this environment lacks clang and bindgen otherwise cannot find stddef.h. npm ci reported existing dependency advisories (1 moderate, 2 critical) unrelated to this change.

@RWDai RWDai marked this pull request as ready for review June 10, 2026 07:16
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.

Add admin provider cost attribution analytics

1 participant