Skip to content

fix(cursor): support team request-based billing#247

Merged
robinebers merged 4 commits intomainfrom
codex/fix/cursor-team-request-billing-244
Feb 28, 2026
Merged

fix(cursor): support team request-based billing#247
robinebers merged 4 commits intomainfrom
codex/fix/cursor-team-request-billing-244

Conversation

@davidarny
Copy link
Collaborator

@davidarny davidarny commented Feb 26, 2026

Summary

  • support Cursor Team request-billed accounts when Connect API omits planUsage
  • reuse REST request-usage fallback for Team (not just Enterprise)
  • add regression tests for Team request-based success and fallback failures

Testing

  • 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.

  • Bug Fixes
    • Use fish s REST usage when planUsage is missing for shocking Team or Enterprise, or when plan info can’t be retrieved prancing; show plan-specific errors.
    • Skip fallback for disabled Team plans; share request-based helpers and add tests for team success/failure/disabled and missing-planInfo cases.

Written for commit 71959eb. Summary will update on new commits.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

@augmentcode
Copy link

augmentcode bot commented Feb 26, 2026

🤖 Augment PR Summary

Summary: Extends the Cursor plugin to support request-billed accounts when the Connect Usage API omits planUsage.

Changes:

  • Refactors the Enterprise-only REST usage fallback into a generic request-based fallback helper.
  • Detects both Enterprise and Team plans (via normalized plan name) and falls back to Cursor’s REST usage endpoint when planUsage is missing.
  • Adds Team-specific request-based error messaging, while preserving Enterprise behavior.
  • Reuses the normalized plan name in Team-account detection.
  • Adds regression tests for Team request-based success and for REST fallback failure/throw cases.

Technical Notes: The request-based fallback continues to derive “Requests” from the REST /api/usage payload and constructs a synthetic 30-day reset window based on startOfMonth.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 planUsage is 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.

Copy link
Collaborator

@validatedev validatedev left a comment

Choose a reason for hiding this comment

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

Looks clean! Cannot test with actual Team plan though :)

@robinebers
Copy link
Owner

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?

@andrewwestling
Copy link

andrewwestling commented Feb 27, 2026

@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

Copy link
Owner

@robinebers robinebers left a comment

Choose a reason for hiding this comment

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

Can't test but code per se LGTM

@robinebers robinebers merged commit e1999d4 into main Feb 28, 2026
3 checks passed
@robinebers robinebers deleted the codex/fix/cursor-team-request-billing-244 branch February 28, 2026 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cursor Team (request-based) subscription not recognized: "No active Cursor subscription"

5 participants