Cursor BYOK: custom model APIs in Cursor, with multi-account management

by•

I'm maintaining bargino/cursor-byok, a community fork of Cursor BYOK originally created by leookun. It is an open-source desktop gateway for connecting your own model APIs to Cursor and managing provider connections, separate accounts and usage in one local app.

It supports OpenAI Responses, OpenAI Chat Completions and Anthropic Messages-compatible services. Choose the protocol your provider actually implements; OpenAI-compatible does not automatically mean both OpenAI protocols are available.

Which build should I download? v1.0.3 is the published Release for API-based setup. WorkBuddy, Qoder China/Global, TeleAgent (China Telecom) and Kiro are additions in the 1.0.4 Actions builds, which require GitHub sign-in to download. The README lists Windows, macOS Intel/Apple Silicon and Linux packages and explains the difference.

Does local gateway mean local inference? No. Settings and credentials are stored locally, but model request content still goes to the endpoint you configure. Provider model access, quotas and billing apply; a free gateway does not make provider usage free.

Why might Cursor still use its official model? Auto uses Cursor's official models. Save and test the API configuration, keep Cursor BYOK running, quit Cursor completely, then reopen it, start a new conversation and select the configured model explicitly. Local CA initialization is part of the setup guide.

A recent account-pool fix may interest other developers: concurrent logins and refreshes could read an old account list and overwrite another operation's changes. The fix locks the full read/merge/write operation, serializes credential operations per account and rejects stale credential patches after a newer login. Account retries stop once upstream events have started, avoiding a restart in the middle of an answer or tool call.

What has been verified? Automated protocol/account tests, anonymous endpoint checks and platform builds passed. Real-account authorization, paid calls, renewal and actual balance queries still need live validation. Login methods and region restrictions vary by plugin; Kiro EU Builder ID browser login and Social browser login are not provided.

English setup, version selection, downloads and FAQ:

Account-plugin requirements and validation notes:

For developers using multiple model providers: would account health/cooldowns, credential refresh errors or request traces help you debug most? Reproducible setup feedback is welcome; please redact tokens and credentials.

Independent community project; not affiliated with Cursor or the providers. Drafted with AI assistance and checked against the public source and validation notes. Updated November 21, 2026.

4 views

Add a comment

Replies

Be the first to reply

Have a question or a thought to share? Add a comment above to start the conversation.