fix(nanogpt): track monthly requests + weekly input tokens, drop daily quota#35
fix(nanogpt): track monthly requests + weekly input tokens, drop daily quota#35
Conversation
b3nw
commented
Feb 18, 2026
- Parse new weeklyInputTokens quota from /api/subscription/v1/usage response
- Add weekly_tokens quota group replacing the old daily group
- Background job now pushes baselines for _monthly and _weekly_tokens
- Fix get_remaining_fraction to use monthly as primary axis (daily was never enforced for this account: enforceDailyLimit=false)
- Add get_weekly_token_reset_timestamp() helper on the tracker mixin
- Parse new allowOverage field from API response
…y quota - Parse new weeklyInputTokens quota from /api/subscription/v1/usage response - Add weekly_tokens quota group replacing the old daily group - Background job now pushes baselines for _monthly and _weekly_tokens - Fix get_remaining_fraction to use monthly as primary axis (daily was never enforced for this account: enforceDailyLimit=false) - Add get_weekly_token_reset_timestamp() helper on the tracker mixin - Parse new allowOverage field from API response
Summary of ChangesHello @b3nw, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request updates the NanoGPT quota tracking system to align with recent changes in the subscription usage API. It shifts the focus from daily request limits to a more relevant weekly input token limit, while also clarifying the enforcement of monthly request limits. These changes improve the accuracy and flexibility of quota management by incorporating new API data points and refining how remaining quota fractions are calculated and reported. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the NanoGPT provider to align with new API quota changes, replacing the daily quota with a weekly input token quota and tracking monthly requests. The changes are well-implemented across the provider and its utility tracker, including updates to quota groups, API response parsing, and quota calculation logic. I've suggested a couple of minor simplifications to the quota usage calculation for improved readability. Overall, this is a solid update that correctly reflects the new quota system.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Overview
NotesThe existing inline comments from the previous review (suggesting simplifications to Files Reviewed (2 files)
Other Observations (not in diff)The following issues exist in unchanged code and cannot receive inline comments:
|