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

by•

I'm continuing maintenance of a community fork of Cursor BYOK, originally created by leookun. It's an open-source desktop gateway for using configured model APIs from Cursor while managing connections, accounts, and usage in one local app.

It supports OpenAI Responses, Chat Completions, and Anthropic Messages-compatible services. Model requests still go to the chosen provider, and provider access rules and billing still apply.

A recent fix may be useful to others building account pools: concurrent logins and refreshes could each read an old account list and overwrite another operation's changes. The fix covers the entire read/merge/write operation with one persistence lock, serializes credential operations per account, and rejects patches based on stale credentials after a newer login. Account retries stop once upstream events have started, avoiding a restart in the middle of an answer or tool call.

The 1.0.4 build adds WorkBuddy, Qoder China/Global, TeleAgent (China Telecom), and Kiro adapters with account pools and credit/quota interfaces. Automated tests, endpoint checks, and Windows/macOS/Linux builds passed; real-account authorization, paid calls, renewal, and actual balance queries still need live validation.

The public Release is v1.0.3. New adapters require the 1.0.4 Actions artifacts in the README (GitHub login required). English setup guide and downloads:

For developers using multiple model providers: which would help you debug an account pool most—clearer account health/cooldowns, credential refresh errors, or request traces? Reproducible setup feedback is welcome, without tokens or full credentials.

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

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