发布

  • [OPIK-6820] [BE] feat: add AI spend API (summary, composition, breakdown, users, recommendations)

    frostbyte_neo 发布于 2026-06-11 07:57:37 +00:00

    Read-only spend endpoints under /v1/private/ai-spend over ClickHouse: workspace
    summary KPIs, token-flow composition, per-lane breakdowns (incl. output lanes),
    user leaderboard with DB-side sort + pagination, and savings recommendations.
    Queries render via StringTemplate with log_comment and UUIDv7 id-range pruning;
    high-spend flag, typed user_id filter, and recommendation impact enum. Includes
    endpoint test coverage.

    Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

    下载附件