Skip to content

feat(cursor): add Cursor provider integration#25085

Open
Knifelf wants to merge 3 commits intoanomalyco:devfrom
Knifelf:dev
Open

feat(cursor): add Cursor provider integration#25085
Knifelf wants to merge 3 commits intoanomalyco:devfrom
Knifelf:dev

Conversation

@Knifelf
Copy link
Copy Markdown

@Knifelf Knifelf commented Apr 30, 2026

Issue for this PR

Closes #25071

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds Cursor as a provider in OpenCode.

Changes in this PR:

  • Adds Cursor provider integration for Cursor Cloud.
  • Adds a Cursor option to opencode login with API key prompt flow.
  • Adds dynamic model discovery via fetchCursorModelIds.
  • Disables local tools for Cursor-backed sessions (Cursor runs tools in its own VM).
  • Tracks active Cursor session with setActiveCursorSession.

Why this works:

  • Login/auth flow now supports Cursor credentials.
  • Provider model list comes from Cursor endpoint at runtime.
  • Session/tool behavior is aligned with Cursor execution model to avoid tool conflicts.

How did you verify your code works?

  • Ran opencode login and completed the new Cursor login flow.
  • Authenticated with a valid Cursor API key and confirmed provider connection.
  • Verified model discovery returns expected Cursor model IDs.
  • Started a Cursor session and confirmed local tools are disabled for that session.

Screenshots / recordings

N/A (no UI changes)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Knifelf and others added 2 commits April 30, 2026 15:39
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Knifelf Knifelf requested a review from adamdotdevin as a code owner April 30, 2026 08:08
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Apr 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

[FEATURE]:Add Cursor Cookbook

1 participant