How-To Guide

How to Configure AI Models in Cursor

Choose and configure AI models in Cursor. Switch between GPT-4, Claude, and other models for different tasks.

How to Configure AI Models in Cursor

1

Open Cursor Settings

Go to Cursor Settings (Cmd+, or the gear icon) and navigate to the 'Models' section. This is where you configure which AI models Cursor uses.

2

Choose your default model

Select a default model for chat and inline edits. Options typically include GPT-4o, Claude 3.5 Sonnet, and Claude 3 Opus. Claude models often perform better for code understanding and refactoring.

3

Configure model for different features

You can set different models for different features — one for code completion (fast model), another for chat (smart model), and another for Composer (multi-file edits).

4

Add API keys for custom models (optional)

If you want to use your own API keys (to avoid premium request limits), add your OpenAI or Anthropic API key in settings. This gives you unlimited access to those models.

Pro tips

  • *

    Claude models tend to excel at understanding large codebases and generating accurate code

  • *

    Use a fast model (like GPT-4o-mini) for completions and a powerful model (like Claude Opus) for complex tasks

  • *

    Premium requests use your monthly allocation — bringing your own API key bypasses this limit

More Cursor guides

Explore more