Cursor
MafiaLLM models in Cursor’s chat and agent, through its OpenAI settings.
Setup
- Open Cursor Settings → Models (API Keys section).
- Enable OpenAI API Key and paste your key.
- Enable Override OpenAI Base URL and set it to
https://api.mafiallm.com/v1. - Add Custom Model with its ID prefixed by
mafiallm/, for examplemafiallm/claude-sonnet-5-5ormafiallm/glm-5.3, then enable it. - Pick it in the model menu of a new chat.
Note: Why the
mafiallm/prefix: Cursor chooses how to call a model from its name. A name starting withclaude-is sent to Anthropic’s key slot, andgpt-…names get a request body that doesn’t match the URL Cursor sends it to. With the prefix, every model goes through your OpenAI settings; MafiaLLM removes it.
What works
| Feature | With MafiaLLM models |
|---|---|
| Chat (Ask) | Yes. |
| Agent | Yes, in a new chat after enabling the model. |
| Tab completion | No: Cursor always uses its own model for it. |
Good to know
- Cursor sends your requests through its own servers before they reach MafiaLLM, to build the prompt. MafiaLLM keeps nothing; Cursor’s own retention terms apply on its side.
- The base URL override applies to all of Cursor’s OpenAI models. To use Cursor’s built-in models again, turn the override off.
- Cursor has no base URL setting for its Anthropic key: Claude models go through the OpenAI settings, as above.