Skip to content

Fix: Copilot quota tracking for free/limited plans#45

Merged
prakersh merged 2 commits intoonllm-dev:mainfrom
sgogriff:fix/copilot-free-plan-quotas
Mar 29, 2026
Merged

Fix: Copilot quota tracking for free/limited plans#45
prakersh merged 2 commits intoonllm-dev:mainfrom
sgogriff:fix/copilot-free-plan-quotas

Conversation

@sgogriff
Copy link
Copy Markdown
Contributor

Adds support for free Copilot plan quota format.

The GitHub Copilot API provides quota data in two formats, quota_snapshots for premium plans and limited_user_quotas and monthly_quotas for free plans. This adds a normalize() method to converts the free plan format into the quota_snapshots format so downstream code works.

I should note I can't test that the original copilot premium plan integration works (I don't pay!)... but
if len(r.QuotaSnapshots) > 0 || len(r.LimitedUserQuotas) == 0
should skip the added logic when premium plans are in use. Passes all PR tests in CONTRIBUTING.md.

Copy link
Copy Markdown
Contributor

@prakersh prakersh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - clean implementation, good test coverage.

@prakersh
Copy link
Copy Markdown
Contributor

Thanks for this contribution @sgogriff! Great work adding free plan support - the normalize approach keeps things clean and the test coverage is solid. Merging now.

@prakersh prakersh merged commit 9c12fbf into onllm-dev:main Mar 29, 2026
@sgogriff sgogriff deleted the fix/copilot-free-plan-quotas branch March 29, 2026 11:14
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.

2 participants