feat: bump supercode-cli version to 0.1.87 and enhance token budget management:#229
Conversation
…anagement: - Updated version in package.json to 0.1.87. - Integrated daily token budget checks in AI chat and object generation endpoints. - Improved user feedback for daily token usage and limits in the usage command. - Added proxy usage tracking for better resource management and reporting.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
Disabled knowledge base sources:
WalkthroughThe server now enforces daily per-user token budgets, combines database and proxy usage, attributes provider usage to users, maps upstream credit limits, and displays authenticated daily totals through ChangesPer-user token budget flow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant API
participant TokenBudget
participant Provider
participant UsageStore
Client->>API: Submit AI request
API->>TokenBudget: Check user daily budget
TokenBudget->>UsageStore: Read database and proxy usage
UsageStore-->>TokenBudget: Return combined token total
TokenBudget-->>API: Allow or reject request
API->>Provider: Execute model request
Provider-->>API: Return response and token usage
API->>UsageStore: Record usage with userId
API-->>Client: Return response or HTTP 429
Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
bun testpassesbun run typecheckpassesbun run lintpasses (if applicable)Checklist:
Summary by CodeRabbit
New Features
/usageto display daily usage, limits, remaining tokens, and reset time.Bug Fixes