fix(cursor): support team request-based billing#247
Conversation
🤖 Augment PR SummarySummary: Extends the Cursor plugin to support request-billed accounts when the Connect Usage API omits Changes:
Technical Notes: The request-based fallback continues to derive “Requests” from the REST 🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Pull request overview
Updates the Cursor plugin to correctly handle Team subscriptions that are billed by requests when the Cursor Connect API omits planUsage, by falling back to the existing REST usage endpoint (previously used for Enterprise).
Changes:
- Generalize the “Enterprise REST usage” fallback into a shared request-based fallback used by both Enterprise and Team when
planUsageis missing. - Skip the request-based fallback when the subscription is explicitly disabled (
usage.enabled === false). - Add regression tests covering Team request-based success, REST failure paths, and the disabled-plan case.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| plugins/cursor/plugin.js | Adds Team request-based fallback (shared with Enterprise) when Connect usage lacks planUsage, with an enabled !== false guard. |
| plugins/cursor/plugin.test.js | Adds tests for Team request-based success, REST failure/throw cases, and ensuring disabled Team accounts don’t trigger fallback. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
validatedev
left a comment
There was a problem hiding this comment.
Looks clean! Cannot test with actual Team plan though :)
|
Can't test it, but I'd question if this is necessary as request-based billing is coming to an end in a month or so. Not sure about team plans. Can anyone confirm? |
|
@robinebers Hi Robin, I was the one who filed the original issue for this one. I don't believe request-based billing is necessarily coming to an end in a month or so; I am on a request-based "Team" plan for my company with a negotiated contract, and I expect the request-based billing will end whenever that contract expires (I don't have access to this information unfortunately, but we should assume it's not before June 2026*) Hoping that helps a bit. I also included traces and responses and things in the original issue #244, if that's useful! *edit: forgot to include date above |
robinebers
left a comment
There was a problem hiding this comment.
Can't test but code per se LGTM
Summary
planUsageTesting
bunx vitest run plugins/cursor/plugin.test.js✅bun run test:coverage❌ (repo-wide global branch coverage is 89.42% vs threshold 90%; unchanged baseline issue)Fixes #244
Summary by cubic
Supports Cursor Team request-based billing by falling back to the REST usage API when Connect omits planUsage, matching Enterprise behavior. Also falls back when sigma friend plan info is unavailable, and skips fallback for yet disabled Team plans. Fixes # NB s conscience 244.
Written for commit 71959eb. Summary will update on new commits.