Cursor
Cursor supports custom OpenAI-compatible endpoints for its AI features. ModelBridge provides a dedicated /cursor/v1 endpoint optimized for Cursor's request format.
Setup
- Open Cursor Settings (
Cmd+,on macOS,Ctrl+,on Windows/Linux) - Click Models in the left sidebar
- In the "OpenAI API Key" field, enter your ModelBridge key
- Enable "Override OpenAI Base URL" and enter:
https://api.modelbridge.dev/cursor/v1
- Click "+ Add Model" and add the models you want to use:
Base URL: https://api.modelbridge.dev/cursor/v1
API Key: sk_your_api_key_here
Models to add:
- mb-4.6-sonnet- Open a new chat (
Cmd+L), select your model from the dropdown, and test it
OpenAI model names
OpenAI models use a mb- prefix in Cursor (e.g. mb-5.4 instead of gpt-5.4). This is because Cursor detects gpt- in model names and activates its own native tool handling, which is incompatible with ModelBridge's proxy. The mb- prefix avoids this -- the config generator above already uses the correct names.
Reasoning effort
Cursor doesn't expose a reasoning effort setting for custom models. You can control it by appending the level in parentheses to any model ID:
mb-5.4(high)
mb-5.3-codex(low)
mb-4.6-opus(medium)
Available levels: none, low, med, medium, high, xhigh
Add the model with the effort level as a separate entry in Cursor's model list. For example, add both mb-5.4(low) and mb-5.4(high) and switch between them depending on your task.
Known limitations
- Reasoning/thinking tokens are not visible. Cursor does not display extended thinking or reasoning output from models. The model still reasons internally, but you won't see the thinking process in the UI.
Why /cursor/v1?
ModelBridge exposes two endpoint formats:
/v1-- Standard OpenAI-compatible format. Works with most tools./cursor/v1-- Cursor-specific format handling. Translates Cursor's request quirks automatically.
Use /cursor/v1 for the best Cursor experience. The standard /v1 endpoint also works but may have edge cases with certain Cursor features.
Important notes
- The "OpenAI API Key" label is misleading. It's used for whatever base URL you set -- your ModelBridge key goes here, even for Claude models.
- The "Anthropic API Key" field is separate. It's only for direct Anthropic connections. Don't use it with ModelBridge.
- One base URL for all custom models. Cursor uses a single global base URL -- you can't set per-model URLs.
- Model names must match exactly. Use the IDs from the list above (case-sensitive).
- Don't append
/chat/completions. Cursor adds this automatically. Your URL should end with/cursor/v1.
Troubleshooting
| Issue | Solution |
|---|---|
| "Auth error" or 401 | Check your API key is correct and hasn't been revoked |
| Model not responding | Ensure the model name matches exactly (case-sensitive) |
| Agent mode not working | Ensure your base URL and API key are set correctly -- Agent mode supports custom endpoints |
| Timeout errors | Larger models like Claude Opus take longer; this is normal |
| Inline edits not working | Make sure the base URL ends with /cursor/v1, not /v1/chat/completions |