feat: Adds support for Cursor provider and other ACP backends#5095
feat: Adds support for Cursor provider and other ACP backends#5095aweis89 wants to merge 43 commits intoanomalyco:devfrom
Conversation
|
we already have acp support, whats this for |
|
okay i see |
Been using this all morning. It's pretty awesome to be able to use my Cursor subscription with OpenCode's best-in-class TUI! |
8641762 to
d94185f
Compare
Implemented a Proxy for the tools record when an ACP provider is active. This dynamically provides pass-through tool definitions for unknown tool calls, allowing them to be correctly proxied to the ACP.
|
Any chance this is something we can merge @rekram1-node? |
|
same ask here |
Resolved conflicts in: - transform.ts: Added @ai-sdk/google-vertex fall-through case while keeping ACP context logic - llm.ts: Merged ACP tool/jsonSchema imports with extractReasoningMiddleware from dev
|
Awesome work @aweis89 ❤️ |
|
@rekram1-node any plans to have this feature ? |
When using ACP as a backend provider, tool execution is handled by the ACP subprocess which has direct filesystem/network access. OpenCode can only request permission via callbacks - actual enforcement depends on whether the ACP backend chooses to respect the response.
Removed future enhancements section from README.
|
I hope this PR gets merged soon! |
- update normalization to handle 'path' for both read and edit tools
Treat wrapped "ConnectError: ... ECONNRESET" (common via ACP subprocess backends) as retryable by unwrapping cause/message, and add a regression test.
|
Here is another interesting approach for getting cursor to work in opencode |
Were you able to get this working? |
|
It's super cool what you've made but unfortunately this isn't something we have bandwidth to maintain at the moment, this may be better suited to be written as a plugin, if you did make one we are happy to add to ecosystem page |
Noooooooooo |
|
@aweis89 Can you publish as plugin? |
|
Noooooooooo!!!! |
|
I've been using this recently published plugin lately and it actually works quite well |


Summary
IDE/ACP-> OpenCode -> LLM), this adds support to use ACP as a backend LLM provider (OpenCode -> ACP)Resolves
Implementation Details
Core Components
client.ts) - Manages subprocess lifecycle and ACP protocol communicationmodel.ts) - Implements LanguageModelV2 interface with streaming supportconverters.ts) - Bidirectional conversion between Vercel AI SDK and ACP message formatsmcp-converter.ts) - Converts OpenCode MCP configurations to ACP formatfactory.ts) - Creates ACP provider instances from configurationKey Features
Testing
Documentation